From 0eed04c802f4a50c9409a6682a474852bebee990 Mon Sep 17 00:00:00 2001
From: Ruslan Bukin
Date: Fri, 31 Jul 2020 23:02:17 +0000
Subject: [PATCH 001/141] Add iommu_domain_map_ops virtual table with map/unmap
methods so x86 can support Intel DMAR and AMD IOMMU simultaneously.
Reviewed by: kib
Sponsored by: DARPA/AFRL
Differential Revision: https://reviews.freebsd.org/D25894
---
sys/dev/iommu/iommu.h | 8 ++++++++
sys/dev/iommu/iommu_gas.c | 15 ++++++---------
sys/x86/iommu/intel_ctx.c | 5 ++++-
sys/x86/iommu/intel_dmar.h | 5 +----
sys/x86/iommu/intel_idpgtbl.c | 23 ++++++++++++++++++++---
5 files changed, 39 insertions(+), 17 deletions(-)
diff --git a/sys/dev/iommu/iommu.h b/sys/dev/iommu/iommu.h
index e6ad0569a9ac..31f9e5959698 100644
--- a/sys/dev/iommu/iommu.h
+++ b/sys/dev/iommu/iommu.h
@@ -100,6 +100,13 @@ struct iommu_unit {
uint32_t buswide_ctxs[(PCI_BUSMAX + 1) / NBBY / sizeof(uint32_t)];
};
+struct iommu_domain_map_ops {
+ int (*map)(struct iommu_domain *domain, iommu_gaddr_t base,
+ iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags);
+ int (*unmap)(struct iommu_domain *domain, iommu_gaddr_t base,
+ iommu_gaddr_t size, int flags);
+};
+
/*
* Locking annotations:
* (u) - Protected by iommu unit lock
@@ -109,6 +116,7 @@ struct iommu_unit {
struct iommu_domain {
struct iommu_unit *iommu; /* (c) */
+ const struct iommu_domain_map_ops *ops;
struct mtx lock; /* (c) */
struct task unload_task; /* (c) */
u_int entries_cnt; /* (d) */
diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c
index 04d7d9667109..fe5d59329b9d 100644
--- a/sys/dev/iommu/iommu_gas.c
+++ b/sys/dev/iommu/iommu_gas.c
@@ -66,10 +66,7 @@ __FBSDID("$FreeBSD$");
#include
#include
#if defined(__amd64__) || defined(__i386__)
-#include
-#include
#include
-#include
#endif
#include
@@ -620,9 +617,9 @@ iommu_gas_map(struct iommu_domain *domain,
entry->flags |= eflags;
IOMMU_DOMAIN_UNLOCK(domain);
- error = domain_map_buf(domain, entry->start, entry->end - entry->start,
- ma, eflags,
- ((flags & IOMMU_MF_CANWAIT) != 0 ? IOMMU_PGF_WAITOK : 0));
+ error = domain->ops->map(domain, entry->start,
+ entry->end - entry->start, ma, eflags,
+ ((flags & IOMMU_MF_CANWAIT) != 0 ? IOMMU_PGF_WAITOK : 0));
if (error == ENOMEM) {
iommu_domain_unload_entry(entry, true);
return (error);
@@ -658,9 +655,9 @@ iommu_gas_map_region(struct iommu_domain *domain, struct iommu_map_entry *entry,
if (entry->end == entry->start)
return (0);
- error = domain_map_buf(domain, entry->start, entry->end - entry->start,
- ma + OFF_TO_IDX(start - entry->start), eflags,
- ((flags & IOMMU_MF_CANWAIT) != 0 ? IOMMU_PGF_WAITOK : 0));
+ error = domain->ops->map(domain, entry->start,
+ entry->end - entry->start, ma + OFF_TO_IDX(start - entry->start),
+ eflags, ((flags & IOMMU_MF_CANWAIT) != 0 ? IOMMU_PGF_WAITOK : 0));
if (error == ENOMEM) {
iommu_domain_unload_entry(entry, false);
return (error);
diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c
index 234a920d1ded..2f02bd1cdf2c 100644
--- a/sys/x86/iommu/intel_ctx.c
+++ b/sys/x86/iommu/intel_ctx.c
@@ -341,6 +341,7 @@ dmar_domain_alloc(struct dmar_unit *dmar, bool id_mapped)
mtx_init(&domain->iodom.lock, "dmardom", NULL, MTX_DEF);
domain->dmar = dmar;
domain->iodom.iommu = &dmar->iommu;
+ domain_pgtbl_init(domain);
/*
* For now, use the maximal usable physical address of the
@@ -842,15 +843,17 @@ dmar_domain_unload(struct dmar_domain *domain,
struct iommu_map_entries_tailq *entries, bool cansleep)
{
struct dmar_unit *unit;
+ struct iommu_domain *iodom;
struct iommu_map_entry *entry, *entry1;
int error;
+ iodom = (struct iommu_domain *)domain;
unit = (struct dmar_unit *)domain->iodom.iommu;
TAILQ_FOREACH_SAFE(entry, entries, dmamap_link, entry1) {
KASSERT((entry->flags & IOMMU_MAP_ENTRY_MAP) != 0,
("not mapped entry %p %p", domain, entry));
- error = domain_unmap_buf(domain, entry->start, entry->end -
+ error = iodom->ops->unmap(iodom, entry->start, entry->end -
entry->start, cansleep ? IOMMU_PGF_WAITOK : 0);
KASSERT(error == 0, ("unmap %p error %d", domain, error));
if (!unit->qi_enabled) {
diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h
index eae01bcc134d..23cffe6f6fb6 100644
--- a/sys/x86/iommu/intel_dmar.h
+++ b/sys/x86/iommu/intel_dmar.h
@@ -244,14 +244,11 @@ void dmar_qi_invalidate_iec(struct dmar_unit *unit, u_int start, u_int cnt);
vm_object_t domain_get_idmap_pgtbl(struct dmar_domain *domain,
iommu_gaddr_t maxaddr);
void put_idmap_pgtbl(vm_object_t obj);
-int domain_map_buf(struct iommu_domain *domain, iommu_gaddr_t base,
- iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags);
-int domain_unmap_buf(struct dmar_domain *domain, iommu_gaddr_t base,
- iommu_gaddr_t size, int flags);
void domain_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base,
iommu_gaddr_t size);
int domain_alloc_pgtbl(struct dmar_domain *domain);
void domain_free_pgtbl(struct dmar_domain *domain);
+void domain_pgtbl_init(struct dmar_domain *domain);
int dmar_dev_depth(device_t child);
void dmar_dev_path(device_t child, int *busno, void *path1, int depth);
diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c
index 4c151ffffef8..9e4beea9031b 100644
--- a/sys/x86/iommu/intel_idpgtbl.c
+++ b/sys/x86/iommu/intel_idpgtbl.c
@@ -498,7 +498,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base,
return (0);
}
-int
+static int
domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base,
iommu_gaddr_t size, vm_page_t *ma, uint64_t eflags, int flags)
{
@@ -684,12 +684,15 @@ domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base,
return (0);
}
-int
-domain_unmap_buf(struct dmar_domain *domain, iommu_gaddr_t base,
+static int
+domain_unmap_buf(struct iommu_domain *iodom, iommu_gaddr_t base,
iommu_gaddr_t size, int flags)
{
+ struct dmar_domain *domain;
int error;
+ domain = (struct dmar_domain *)iodom;
+
DMAR_DOMAIN_PGLOCK(domain);
error = domain_unmap_buf_locked(domain, base, size, flags);
DMAR_DOMAIN_PGUNLOCK(domain);
@@ -809,3 +812,17 @@ domain_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base,
}
DMAR_UNLOCK(unit);
}
+
+static const struct iommu_domain_map_ops dmar_domain_map_ops = {
+ .map = domain_map_buf,
+ .unmap = domain_unmap_buf,
+};
+
+void
+domain_pgtbl_init(struct dmar_domain *domain)
+{
+ struct iommu_domain *iodom;
+
+ iodom = (struct iommu_domain *)domain;
+ iodom->ops = &dmar_domain_map_ops;
+}
From cb889ce631b9d37bf0fe82290616bf4e4596d47f Mon Sep 17 00:00:00 2001
From: Rick Macklem
Date: Fri, 31 Jul 2020 23:35:49 +0000
Subject: [PATCH 002/141] Add optional support for ext_pgs mbufs to the NFS
server's read, readlink and getxattr operations.
This patch optionally enables generation of read, readlink and getxattr replies
in ext_pgs mbufs. Since neither of ND_EXTPG or ND_TLS are currently ever set,
there is no change in semantics at this time.
It also corrects the message in a couple of panic()s that should never occur.
This is another in the series of commits that add support to the NFS client
and server for building RPC messages in ext_pgs mbufs with anonymous pages.
This is useful so that the entire mbuf list does not need to be
copied before calling sosend() when NFS over TLS is enabled.
Use of ext_pgs mbufs will not be enabled until the kernel RPC is updated
to handle TLS.
---
sys/fs/nfs/nfs_var.h | 6 +-
sys/fs/nfsserver/nfs_nfsdport.c | 109 +++++++++++++++++++++++++++++---
sys/fs/nfsserver/nfs_nfsdserv.c | 73 ++++++++++++++++++---
3 files changed, 165 insertions(+), 23 deletions(-)
diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h
index 1cf792edeced..7bf89011d2fd 100644
--- a/sys/fs/nfs/nfs_var.h
+++ b/sys/fs/nfs/nfs_var.h
@@ -680,9 +680,9 @@ int nfsvno_namei(struct nfsrv_descript *, struct nameidata *,
vnode_t, int, struct nfsexstuff *, NFSPROC_T *, vnode_t *);
void nfsvno_setpathbuf(struct nameidata *, char **, u_long **);
void nfsvno_relpathbuf(struct nameidata *);
-int nfsvno_readlink(vnode_t, struct ucred *, NFSPROC_T *, struct mbuf **,
+int nfsvno_readlink(vnode_t, struct ucred *, int, NFSPROC_T *, struct mbuf **,
struct mbuf **, int *);
-int nfsvno_read(vnode_t, off_t, int, struct ucred *, NFSPROC_T *,
+int nfsvno_read(vnode_t, off_t, int, struct ucred *, int, NFSPROC_T *,
struct mbuf **, struct mbuf **);
int nfsvno_write(vnode_t, off_t, int, int *, struct mbuf *, char *,
struct ucred *, NFSPROC_T *);
@@ -748,7 +748,7 @@ int nfsvno_seek(struct nfsrv_descript *, struct vnode *, u_long, off_t *, int,
bool *, struct ucred *, NFSPROC_T *);
int nfsvno_allocate(struct vnode *, off_t, off_t, struct ucred *, NFSPROC_T *);
int nfsvno_getxattr(struct vnode *, char *, uint32_t, struct ucred *,
- struct thread *, struct mbuf **, struct mbuf **, int *);
+ uint64_t, int, struct thread *, struct mbuf **, struct mbuf **, int *);
int nfsvno_setxattr(struct vnode *, char *, int, struct mbuf *, char *,
struct ucred *, struct thread *);
int nfsvno_rmxattr(struct nfsrv_descript *, struct vnode *, char *,
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index eb971d73d534..2dda74d885db 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -108,6 +108,8 @@ extern struct nfsdevicehead nfsrv_devidhead;
static int nfsrv_createiovec(int, struct mbuf **, struct mbuf **,
struct iovec **);
+static int nfsrv_createiovec_extpgs(int, int, struct mbuf **,
+ struct mbuf **, struct iovec **);
static int nfsrv_createiovecw(int, struct mbuf *, char *, struct iovec **,
int *);
static void nfsrv_pnfscreate(struct vnode *, struct vattr *, struct ucred *,
@@ -738,8 +740,8 @@ nfsvno_relpathbuf(struct nameidata *ndp)
* Readlink vnode op into an mbuf list.
*/
int
-nfsvno_readlink(struct vnode *vp, struct ucred *cred, struct thread *p,
- struct mbuf **mpp, struct mbuf **mpendp, int *lenp)
+nfsvno_readlink(struct vnode *vp, struct ucred *cred, int maxextsiz,
+ struct thread *p, struct mbuf **mpp, struct mbuf **mpendp, int *lenp)
{
struct iovec *iv;
struct uio io, *uiop = &io;
@@ -747,7 +749,11 @@ nfsvno_readlink(struct vnode *vp, struct ucred *cred, struct thread *p,
int len, tlen, error = 0;
len = NFS_MAXPATHLEN;
- uiop->uio_iovcnt = nfsrv_createiovec(len, &mp3, &mp, &iv);
+ if (maxextsiz > 0)
+ uiop->uio_iovcnt = nfsrv_createiovec_extpgs(len, maxextsiz,
+ &mp3, &mp, &iv);
+ else
+ uiop->uio_iovcnt = nfsrv_createiovec(len, &mp3, &mp, &iv);
uiop->uio_iov = iv;
uiop->uio_offset = 0;
uiop->uio_resid = len;
@@ -819,7 +825,7 @@ nfsrv_createiovec(int len, struct mbuf **mpp, struct mbuf **mpendp,
i = 0;
while (left > 0) {
if (m == NULL)
- panic("nfsvno_read iov");
+ panic("nfsrv_createiovec iov");
siz = min(M_TRAILINGSPACE(m), left);
if (siz > 0) {
iv->iov_base = mtod(m, caddr_t) + m->m_len;
@@ -836,12 +842,77 @@ nfsrv_createiovec(int len, struct mbuf **mpp, struct mbuf **mpendp,
return (i);
}
+/*
+ * Create an mbuf chain and an associated iovec that can be used to Read
+ * or Getextattr of data.
+ * Upon success, return pointers to the first and last mbufs in the chain
+ * plus the malloc'd iovec and its iovlen.
+ * Same as above, but creates ext_pgs mbuf(s).
+ */
+static int
+nfsrv_createiovec_extpgs(int len, int maxextsiz, struct mbuf **mpp,
+ struct mbuf **mpendp, struct iovec **ivp)
+{
+ struct mbuf *m, *m2 = NULL, *m3;
+ struct iovec *iv;
+ int i, left, pgno, siz;
+
+ left = len;
+ m3 = NULL;
+ /*
+ * Generate the mbuf list with the uio_iov ref. to it.
+ */
+ i = 0;
+ while (left > 0) {
+ siz = min(left, maxextsiz);
+ m = mb_alloc_ext_plus_pages(siz, M_WAITOK);
+ left -= siz;
+ i += m->m_epg_npgs;
+ if (m3 != NULL)
+ m2->m_next = m;
+ else
+ m3 = m;
+ m2 = m;
+ }
+ *ivp = iv = malloc(i * sizeof (struct iovec), M_TEMP, M_WAITOK);
+ m = m3;
+ left = len;
+ i = 0;
+ pgno = 0;
+ while (left > 0) {
+ if (m == NULL)
+ panic("nfsvno_createiovec_extpgs iov");
+ siz = min(PAGE_SIZE, left);
+ if (siz > 0) {
+ iv->iov_base = (void *)PHYS_TO_DMAP(m->m_epg_pa[pgno]);
+ iv->iov_len = siz;
+ m->m_len += siz;
+ if (pgno == m->m_epg_npgs - 1)
+ m->m_epg_last_len = siz;
+ left -= siz;
+ iv++;
+ i++;
+ pgno++;
+ }
+ if (pgno == m->m_epg_npgs && left > 0) {
+ m = m->m_next;
+ if (m == NULL)
+ panic("nfsvno_createiovec_extpgs iov");
+ pgno = 0;
+ }
+ }
+ *mpp = m3;
+ *mpendp = m2;
+ return (i);
+}
+
/*
* Read vnode op call into mbuf list.
*/
int
nfsvno_read(struct vnode *vp, off_t off, int cnt, struct ucred *cred,
- struct thread *p, struct mbuf **mpp, struct mbuf **mpendp)
+ int maxextsiz, struct thread *p, struct mbuf **mpp,
+ struct mbuf **mpendp)
{
struct mbuf *m;
struct iovec *iv;
@@ -860,7 +931,11 @@ nfsvno_read(struct vnode *vp, off_t off, int cnt, struct ucred *cred,
return (error);
len = NFSM_RNDUP(cnt);
- uiop->uio_iovcnt = nfsrv_createiovec(len, &m3, &m, &iv);
+ if (maxextsiz > 0)
+ uiop->uio_iovcnt = nfsrv_createiovec_extpgs(len, maxextsiz,
+ &m3, &m, &iv);
+ else
+ uiop->uio_iovcnt = nfsrv_createiovec(len, &m3, &m, &iv);
uiop->uio_iov = iv;
uiop->uio_offset = off;
uiop->uio_resid = len;
@@ -938,7 +1013,7 @@ nfsrv_createiovecw(int retlen, struct mbuf *m, char *cp, struct iovec **ivpp,
len = retlen;
while (len > 0) {
if (mp == NULL)
- panic("nfsvno_write");
+ panic("nfsrv_createiovecw");
if (i > 0) {
i = min(i, len);
ivp->iov_base = cp;
@@ -6241,8 +6316,8 @@ nfsvno_allocate(struct vnode *vp, off_t off, off_t len, struct ucred *cred,
*/
int
nfsvno_getxattr(struct vnode *vp, char *name, uint32_t maxresp,
- struct ucred *cred, struct thread *p, struct mbuf **mpp,
- struct mbuf **mpendp, int *lenp)
+ struct ucred *cred, uint64_t flag, int maxextsiz, struct thread *p,
+ struct mbuf **mpp, struct mbuf **mpendp, int *lenp)
{
struct iovec *iv;
struct uio io, *uiop = &io;
@@ -6260,7 +6335,21 @@ nfsvno_getxattr(struct vnode *vp, char *name, uint32_t maxresp,
len = siz;
tlen = NFSM_RNDUP(len);
if (tlen > 0) {
- uiop->uio_iovcnt = nfsrv_createiovec(tlen, &m, &m2, &iv);
+ /*
+ * If cnt > MCLBYTES and the reply will not be saved, use
+ * ext_pgs mbufs for TLS.
+ * For NFSv4.0, we do not know for sure if the reply will
+ * be saved, so do not use ext_pgs mbufs for NFSv4.0.
+ * Always use ext_pgs mbufs if ND_EXTPG is set.
+ */
+ if ((flag & ND_EXTPG) != 0 || (tlen > MCLBYTES &&
+ (flag & (ND_TLS | ND_SAVEREPLY)) == ND_TLS &&
+ (flag & (ND_NFSV4 | ND_NFSV41)) != ND_NFSV4))
+ uiop->uio_iovcnt = nfsrv_createiovec_extpgs(tlen,
+ maxextsiz, &m, &m2, &iv);
+ else
+ uiop->uio_iovcnt = nfsrv_createiovec(tlen, &m, &m2,
+ &iv);
uiop->uio_iov = iv;
} else {
uiop->uio_iovcnt = 0;
diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c
index 1b34cb27dd01..d2fe9e60a0ea 100644
--- a/sys/fs/nfsserver/nfs_nfsdserv.c
+++ b/sys/fs/nfsserver/nfs_nfsdserv.c
@@ -667,6 +667,7 @@ nfsrvd_readlink(struct nfsrv_descript *nd, __unused int isdgram,
int getret = 1, len;
struct nfsvattr nva;
struct thread *p = curthread;
+ uint16_t off;
if (nd->nd_repstat) {
nfsrv_postopattr(nd, getret, &nva);
@@ -678,9 +679,14 @@ nfsrvd_readlink(struct nfsrv_descript *nd, __unused int isdgram,
else
nd->nd_repstat = EINVAL;
}
- if (!nd->nd_repstat)
- nd->nd_repstat = nfsvno_readlink(vp, nd->nd_cred, p,
- &mp, &mpend, &len);
+ if (nd->nd_repstat == 0) {
+ if ((nd->nd_flag & ND_EXTPG) != 0)
+ nd->nd_repstat = nfsvno_readlink(vp, nd->nd_cred,
+ nd->nd_maxextsiz, p, &mp, &mpend, &len);
+ else
+ nd->nd_repstat = nfsvno_readlink(vp, nd->nd_cred,
+ 0, p, &mp, &mpend, &len);
+ }
if (nd->nd_flag & ND_NFSV3)
getret = nfsvno_getattr(vp, &nva, nd, p, 1, NULL);
vput(vp);
@@ -693,7 +699,16 @@ nfsrvd_readlink(struct nfsrv_descript *nd, __unused int isdgram,
if (mp != NULL) {
nd->nd_mb->m_next = mp;
nd->nd_mb = mpend;
- nd->nd_bpos = mtod(mpend, caddr_t) + mpend->m_len;
+ if ((mpend->m_flags & M_EXTPG) != 0) {
+ nd->nd_bextpg = mpend->m_epg_npgs - 1;
+ nd->nd_bpos = (char *)(void *)
+ PHYS_TO_DMAP(mpend->m_epg_pa[nd->nd_bextpg]);
+ off = (nd->nd_bextpg == 0) ? mpend->m_epg_1st_off : 0;
+ nd->nd_bpos += off + mpend->m_epg_last_len;
+ nd->nd_bextpgsiz = PAGE_SIZE - mpend->m_epg_last_len -
+ off;
+ } else
+ nd->nd_bpos = mtod(mpend, char *) + mpend->m_len;
}
out:
@@ -718,6 +733,7 @@ nfsrvd_read(struct nfsrv_descript *nd, __unused int isdgram,
nfsv4stateid_t stateid;
nfsquad_t clientid;
struct thread *p = curthread;
+ uint16_t poff;
if (nd->nd_repstat) {
nfsrv_postopattr(nd, getret, &nva);
@@ -839,8 +855,21 @@ nfsrvd_read(struct nfsrv_descript *nd, __unused int isdgram,
cnt = reqlen;
m3 = NULL;
if (cnt > 0) {
- nd->nd_repstat = nfsvno_read(vp, off, cnt, nd->nd_cred, p,
- &m3, &m2);
+ /*
+ * If cnt > MCLBYTES and the reply will not be saved, use
+ * ext_pgs mbufs for TLS.
+ * For NFSv4.0, we do not know for sure if the reply will
+ * be saved, so do not use ext_pgs mbufs for NFSv4.0.
+ * Always use ext_pgs mbufs if ND_EXTPG is set.
+ */
+ if ((nd->nd_flag & ND_EXTPG) != 0 || (cnt > MCLBYTES &&
+ (nd->nd_flag & (ND_TLS | ND_SAVEREPLY)) == ND_TLS &&
+ (nd->nd_flag & (ND_NFSV4 | ND_NFSV41)) != ND_NFSV4))
+ nd->nd_repstat = nfsvno_read(vp, off, cnt, nd->nd_cred,
+ nd->nd_maxextsiz, p, &m3, &m2);
+ else
+ nd->nd_repstat = nfsvno_read(vp, off, cnt, nd->nd_cred,
+ 0, p, &m3, &m2);
if (!(nd->nd_flag & ND_NFSV4)) {
getret = nfsvno_getattr(vp, &nva, nd, p, 1, NULL);
if (!nd->nd_repstat)
@@ -875,7 +904,17 @@ nfsrvd_read(struct nfsrv_descript *nd, __unused int isdgram,
if (m3) {
nd->nd_mb->m_next = m3;
nd->nd_mb = m2;
- nd->nd_bpos = mtod(m2, caddr_t) + m2->m_len;
+ if ((m2->m_flags & M_EXTPG) != 0) {
+ nd->nd_flag |= ND_EXTPG;
+ nd->nd_bextpg = m2->m_epg_npgs - 1;
+ nd->nd_bpos = (char *)(void *)
+ PHYS_TO_DMAP(m2->m_epg_pa[nd->nd_bextpg]);
+ poff = (nd->nd_bextpg == 0) ? m2->m_epg_1st_off : 0;
+ nd->nd_bpos += poff + m2->m_epg_last_len;
+ nd->nd_bextpgsiz = PAGE_SIZE - m2->m_epg_last_len -
+ poff;
+ } else
+ nd->nd_bpos = mtod(m2, char *) + m2->m_len;
}
out:
@@ -5536,6 +5575,7 @@ nfsrvd_getxattr(struct nfsrv_descript *nd, __unused int isdgram,
int error, len;
char *name;
struct thread *p = curthread;
+ uint16_t off;
error = 0;
if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) {
@@ -5555,8 +5595,9 @@ nfsrvd_getxattr(struct nfsrv_descript *nd, __unused int isdgram,
name = malloc(len + 1, M_TEMP, M_WAITOK);
nd->nd_repstat = nfsrv_mtostr(nd, name, len);
if (nd->nd_repstat == 0)
- nd->nd_repstat = nfsvno_getxattr(vp, name, nd->nd_maxresp,
- nd->nd_cred, p, &mp, &mpend, &len);
+ nd->nd_repstat = nfsvno_getxattr(vp, name,
+ nd->nd_maxresp, nd->nd_cred, nd->nd_flag,
+ nd->nd_maxextsiz, p, &mp, &mpend, &len);
if (nd->nd_repstat == ENOATTR)
nd->nd_repstat = NFSERR_NOXATTR;
else if (nd->nd_repstat == EOPNOTSUPP)
@@ -5567,7 +5608,19 @@ nfsrvd_getxattr(struct nfsrv_descript *nd, __unused int isdgram,
if (len > 0) {
nd->nd_mb->m_next = mp;
nd->nd_mb = mpend;
- nd->nd_bpos = mtod(mpend, caddr_t) + mpend->m_len;
+ if ((mpend->m_flags & M_EXTPG) != 0) {
+ nd->nd_flag |= ND_EXTPG;
+ nd->nd_bextpg = mpend->m_epg_npgs - 1;
+ nd->nd_bpos = (char *)(void *)
+ PHYS_TO_DMAP(mpend->m_epg_pa[nd->nd_bextpg]);
+ off = (nd->nd_bextpg == 0) ?
+ mpend->m_epg_1st_off : 0;
+ nd->nd_bpos += off + mpend->m_epg_last_len;
+ nd->nd_bextpgsiz = PAGE_SIZE -
+ mpend->m_epg_last_len - off;
+ } else
+ nd->nd_bpos = mtod(mpend, char *) +
+ mpend->m_len;
}
}
free(name, M_TEMP);
From c5112a4e2d1f6ef0ef4cbd9215d30c663f01b0d3 Mon Sep 17 00:00:00 2001
From: Gregory Neil Shapiro
Date: Sat, 1 Aug 2020 04:57:30 +0000
Subject: [PATCH 003/141] Mirror recommendation from Handbook to avoid linking
conflicts when pulling in SASL libraries.
PR: 247959
Reported by: Scott Allendorf
MFC after: 3 days
---
share/examples/etc/make.conf | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/share/examples/etc/make.conf b/share/examples/etc/make.conf
index 37b3b774c8d2..a7afe4d8b6eb 100644
--- a/share/examples/etc/make.conf
+++ b/share/examples/etc/make.conf
@@ -239,13 +239,11 @@
#
# with SASLv1:
# SENDMAIL_CFLAGS=-I/usr/local/include/sasl1 -DSASL
-# SENDMAIL_LDFLAGS=-L/usr/local/lib
-# SENDMAIL_LDADD=-lsasl
+# SENDMAIL_LDADD=/usr/local/lib/libsasl.so
#
# with SASLv2:
# SENDMAIL_CFLAGS=-I/usr/local/include -DSASL=2
-# SENDMAIL_LDFLAGS=-L/usr/local/lib
-# SENDMAIL_LDADD=-lsasl2
+# SENDMAIL_LDADD=/usr/local/lib/libsasl2.so
#
# Note: If you are using Cyrus SASL with other applications which require
# access to the sasldb file, you should add the following to your
From fe4f491461580265714d24c4dde1ee80c9618f75 Mon Sep 17 00:00:00 2001
From: Mateusz Guzik
Date: Sat, 1 Aug 2020 06:31:58 +0000
Subject: [PATCH 004/141] capsicum: move global caps to caprights.h
.. for easier inclusion
---
sys/sys/caprights.h | 48 +++++++++++++++++++++++++++++++++++++++++++++
sys/sys/capsicum.h | 45 ------------------------------------------
2 files changed, 48 insertions(+), 45 deletions(-)
diff --git a/sys/sys/caprights.h b/sys/sys/caprights.h
index 8698483ce22c..9f396a0df553 100644
--- a/sys/sys/caprights.h
+++ b/sys/sys/caprights.h
@@ -60,4 +60,52 @@ struct cap_rights {
typedef struct cap_rights cap_rights_t;
#endif
+#ifdef _KERNEL
+extern cap_rights_t cap_accept_rights;
+extern cap_rights_t cap_bind_rights;
+extern cap_rights_t cap_connect_rights;
+extern cap_rights_t cap_event_rights;
+extern cap_rights_t cap_fchdir_rights;
+extern cap_rights_t cap_fchflags_rights;
+extern cap_rights_t cap_fchmod_rights;
+extern cap_rights_t cap_fchown_rights;
+extern cap_rights_t cap_fcntl_rights;
+extern cap_rights_t cap_fexecve_rights;
+extern cap_rights_t cap_flock_rights;
+extern cap_rights_t cap_fpathconf_rights;
+extern cap_rights_t cap_fstat_rights;
+extern cap_rights_t cap_fstatfs_rights;
+extern cap_rights_t cap_fsync_rights;
+extern cap_rights_t cap_ftruncate_rights;
+extern cap_rights_t cap_futimes_rights;
+extern cap_rights_t cap_getpeername_rights;
+extern cap_rights_t cap_getsockopt_rights;
+extern cap_rights_t cap_getsockname_rights;
+extern cap_rights_t cap_ioctl_rights;
+extern cap_rights_t cap_linkat_source_rights;
+extern cap_rights_t cap_linkat_target_rights;
+extern cap_rights_t cap_listen_rights;
+extern cap_rights_t cap_mkdirat_rights;
+extern cap_rights_t cap_mkfifoat_rights;
+extern cap_rights_t cap_mknodat_rights;
+extern cap_rights_t cap_mmap_rights;
+extern cap_rights_t cap_no_rights;
+extern cap_rights_t cap_pdgetpid_rights;
+extern cap_rights_t cap_pdkill_rights;
+extern cap_rights_t cap_pread_rights;
+extern cap_rights_t cap_pwrite_rights;
+extern cap_rights_t cap_read_rights;
+extern cap_rights_t cap_recv_rights;
+extern cap_rights_t cap_renameat_source_rights;
+extern cap_rights_t cap_renameat_target_rights;
+extern cap_rights_t cap_seek_rights;
+extern cap_rights_t cap_send_rights;
+extern cap_rights_t cap_send_connect_rights;
+extern cap_rights_t cap_setsockopt_rights;
+extern cap_rights_t cap_shutdown_rights;
+extern cap_rights_t cap_symlinkat_rights;
+extern cap_rights_t cap_unlinkat_rights;
+extern cap_rights_t cap_write_rights;
+#endif
+
#endif /* !_SYS_CAPRIGHTS_H_ */
diff --git a/sys/sys/capsicum.h b/sys/sys/capsicum.h
index bc9a2fe8053c..af596cd179f4 100644
--- a/sys/sys/capsicum.h
+++ b/sys/sys/capsicum.h
@@ -419,51 +419,6 @@ __END_DECLS
#ifdef _KERNEL
#include
-extern cap_rights_t cap_accept_rights;
-extern cap_rights_t cap_bind_rights;
-extern cap_rights_t cap_connect_rights;
-extern cap_rights_t cap_event_rights;
-extern cap_rights_t cap_fchdir_rights;
-extern cap_rights_t cap_fchflags_rights;
-extern cap_rights_t cap_fchmod_rights;
-extern cap_rights_t cap_fchown_rights;
-extern cap_rights_t cap_fcntl_rights;
-extern cap_rights_t cap_fexecve_rights;
-extern cap_rights_t cap_flock_rights;
-extern cap_rights_t cap_fpathconf_rights;
-extern cap_rights_t cap_fstat_rights;
-extern cap_rights_t cap_fstatfs_rights;
-extern cap_rights_t cap_fsync_rights;
-extern cap_rights_t cap_ftruncate_rights;
-extern cap_rights_t cap_futimes_rights;
-extern cap_rights_t cap_getpeername_rights;
-extern cap_rights_t cap_getsockopt_rights;
-extern cap_rights_t cap_getsockname_rights;
-extern cap_rights_t cap_ioctl_rights;
-extern cap_rights_t cap_linkat_source_rights;
-extern cap_rights_t cap_linkat_target_rights;
-extern cap_rights_t cap_listen_rights;
-extern cap_rights_t cap_mkdirat_rights;
-extern cap_rights_t cap_mkfifoat_rights;
-extern cap_rights_t cap_mknodat_rights;
-extern cap_rights_t cap_mmap_rights;
-extern cap_rights_t cap_no_rights;
-extern cap_rights_t cap_pdgetpid_rights;
-extern cap_rights_t cap_pdkill_rights;
-extern cap_rights_t cap_pread_rights;
-extern cap_rights_t cap_pwrite_rights;
-extern cap_rights_t cap_read_rights;
-extern cap_rights_t cap_recv_rights;
-extern cap_rights_t cap_renameat_source_rights;
-extern cap_rights_t cap_renameat_target_rights;
-extern cap_rights_t cap_seek_rights;
-extern cap_rights_t cap_send_rights;
-extern cap_rights_t cap_send_connect_rights;
-extern cap_rights_t cap_setsockopt_rights;
-extern cap_rights_t cap_shutdown_rights;
-extern cap_rights_t cap_symlinkat_rights;
-extern cap_rights_t cap_unlinkat_rights;
-extern cap_rights_t cap_write_rights;
#define IN_CAPABILITY_MODE(td) (((td)->td_ucred->cr_flags & CRED_FLAG_CAPMODE) != 0)
From 21c162605b1d937704cbabcf6168e647132af538 Mon Sep 17 00:00:00 2001
From: Mateusz Guzik
Date: Sat, 1 Aug 2020 06:32:25 +0000
Subject: [PATCH 005/141] vfs: make rights mandatory for NDINIT_ALL
---
sys/kern/vfs_lookup.c | 6 ++----
sys/sys/namei.h | 6 +++---
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index 7e90d86bb6a1..2e06319a25b3 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -1371,6 +1371,7 @@ NDINIT_ALL(struct nameidata *ndp, u_long op, u_long flags, enum uio_seg segflg,
struct thread *td)
{
+ MPASS(rightsp != NULL);
ndp->ni_cnd.cn_nameiop = op;
ndp->ni_cnd.cn_flags = flags;
ndp->ni_segflg = segflg;
@@ -1380,10 +1381,7 @@ NDINIT_ALL(struct nameidata *ndp, u_long op, u_long flags, enum uio_seg segflg,
ndp->ni_resflags = 0;
filecaps_init(&ndp->ni_filecaps);
ndp->ni_cnd.cn_thread = td;
- if (rightsp != NULL)
- ndp->ni_rightsneeded = *rightsp;
- else
- cap_rights_init_zero(&ndp->ni_rightsneeded);
+ ndp->ni_rightsneeded = *rightsp;
}
/*
diff --git a/sys/sys/namei.h b/sys/sys/namei.h
index 0950b0a8f583..cd9687282af9 100644
--- a/sys/sys/namei.h
+++ b/sys/sys/namei.h
@@ -188,13 +188,13 @@ int cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status,
* Initialization of a nameidata structure.
*/
#define NDINIT(ndp, op, flags, segflg, namep, td) \
- NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, NULL, 0, td)
+ NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, NULL, &cap_no_rights, td)
#define NDINIT_AT(ndp, op, flags, segflg, namep, dirfd, td) \
- NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, 0, td)
+ NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, &cap_no_rights, td)
#define NDINIT_ATRIGHTS(ndp, op, flags, segflg, namep, dirfd, rightsp, td) \
NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, rightsp, td)
#define NDINIT_ATVP(ndp, op, flags, segflg, namep, vp, td) \
- NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, vp, 0, td)
+ NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, vp, &cap_no_rights, td)
void NDINIT_ALL(struct nameidata *ndp, u_long op, u_long flags,
enum uio_seg segflg, const char *namep, int dirfd, struct vnode *startdir,
From 14576629bb22f3d138eefb61cf9b1f76d718846a Mon Sep 17 00:00:00 2001
From: Mateusz Guzik
Date: Sat, 1 Aug 2020 06:33:11 +0000
Subject: [PATCH 006/141] vfs: convert ni_rigthsneeded to a pointer
Shaves 8 bytes of struct nameidata on 64-bit platforms.
---
sys/kern/vfs_lookup.c | 6 +++---
sys/sys/namei.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index 2e06319a25b3..fd6f3189e253 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -347,7 +347,7 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp)
*dpp = pwd->pwd_cdir;
vrefact(*dpp);
} else {
- rights = ndp->ni_rightsneeded;
+ rights = *ndp->ni_rightsneeded;
cap_rights_set_one(&rights, CAP_LOOKUP);
if (cnp->cn_flags & AUDITVNODE1)
@@ -403,7 +403,7 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp)
ndp->ni_beneath_latch = pwd->pwd_cdir;
vrefact(ndp->ni_beneath_latch);
} else {
- rights = ndp->ni_rightsneeded;
+ rights = *ndp->ni_rightsneeded;
cap_rights_set_one(&rights, CAP_LOOKUP);
error = fgetvp_rights(td, ndp->ni_dirfd, &rights,
&dirfd_caps, &ndp->ni_beneath_latch);
@@ -1381,7 +1381,7 @@ NDINIT_ALL(struct nameidata *ndp, u_long op, u_long flags, enum uio_seg segflg,
ndp->ni_resflags = 0;
filecaps_init(&ndp->ni_filecaps);
ndp->ni_cnd.cn_thread = td;
- ndp->ni_rightsneeded = *rightsp;
+ ndp->ni_rightsneeded = rightsp;
}
/*
diff --git a/sys/sys/namei.h b/sys/sys/namei.h
index cd9687282af9..d65b0bc66026 100644
--- a/sys/sys/namei.h
+++ b/sys/sys/namei.h
@@ -69,7 +69,7 @@ struct nameidata {
*/
const char *ni_dirp; /* pathname pointer */
enum uio_seg ni_segflg; /* location of pathname */
- cap_rights_t ni_rightsneeded; /* rights required to look up vnode */
+ cap_rights_t *ni_rightsneeded; /* rights required to look up vnode */
/*
* Arguments to lookup.
*/
From 85cf316172d0290ed94738fffd8c6868eeb3d634 Mon Sep 17 00:00:00 2001
From: Mateusz Guzik
Date: Sat, 1 Aug 2020 06:33:38 +0000
Subject: [PATCH 007/141] vfs: inline NDINIT_ALL
The routine takes more than 6 arguments, which on amd64 means some of
them have to be passed through the stack.
---
sys/kern/vfs_lookup.c | 19 -------------------
sys/sys/namei.h | 19 ++++++++++++++++---
2 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index fd6f3189e253..2b37bda9ee3b 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -1365,25 +1365,6 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
return (error);
}
-void
-NDINIT_ALL(struct nameidata *ndp, u_long op, u_long flags, enum uio_seg segflg,
- const char *namep, int dirfd, struct vnode *startdir, cap_rights_t *rightsp,
- struct thread *td)
-{
-
- MPASS(rightsp != NULL);
- ndp->ni_cnd.cn_nameiop = op;
- ndp->ni_cnd.cn_flags = flags;
- ndp->ni_segflg = segflg;
- ndp->ni_dirp = namep;
- ndp->ni_dirfd = dirfd;
- ndp->ni_startdir = startdir;
- ndp->ni_resflags = 0;
- filecaps_init(&ndp->ni_filecaps);
- ndp->ni_cnd.cn_thread = td;
- ndp->ni_rightsneeded = rightsp;
-}
-
/*
* Free data allocated by namei(); see namei(9) for details.
*/
diff --git a/sys/sys/namei.h b/sys/sys/namei.h
index d65b0bc66026..05a5239b36e3 100644
--- a/sys/sys/namei.h
+++ b/sys/sys/namei.h
@@ -196,9 +196,22 @@ int cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status,
#define NDINIT_ATVP(ndp, op, flags, segflg, namep, vp, td) \
NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, vp, &cap_no_rights, td)
-void NDINIT_ALL(struct nameidata *ndp, u_long op, u_long flags,
- enum uio_seg segflg, const char *namep, int dirfd, struct vnode *startdir,
- cap_rights_t *rightsp, struct thread *td);
+#define NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, startdir, rightsp, td) \
+do { \
+ struct nameidata *_ndp = (ndp); \
+ cap_rights_t *_rightsp = (rightsp); \
+ MPASS(_rightsp != NULL); \
+ _ndp->ni_cnd.cn_nameiop = op; \
+ _ndp->ni_cnd.cn_flags = flags; \
+ _ndp->ni_segflg = segflg; \
+ _ndp->ni_dirp = namep; \
+ _ndp->ni_dirfd = dirfd; \
+ _ndp->ni_startdir = startdir; \
+ _ndp->ni_resflags = 0; \
+ filecaps_init(&_ndp->ni_filecaps); \
+ _ndp->ni_cnd.cn_thread = td; \
+ _ndp->ni_rightsneeded = _rightsp; \
+} while (0)
#define NDF_NO_DVP_RELE 0x00000001
#define NDF_NO_DVP_UNLOCK 0x00000002
From 5a3944334c65b90696c3f962efb7f48e3584b5b7 Mon Sep 17 00:00:00 2001
From: Mateusz Guzik
Date: Sat, 1 Aug 2020 06:34:18 +0000
Subject: [PATCH 008/141] cache: mark climb_mount as __noinline
---
sys/kern/vfs_cache.c | 33 +++++++++++++++++++++++++++------
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 6eff71606ac9..fe4739d165e4 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -3448,7 +3448,7 @@ cache_fplookup_mp_supported(struct mount *mp)
* By the end of successful walk we are guaranteed the reached state was
* indeed present at least at some point which matches the regular lookup.
*/
-static int
+static int __noinline
cache_fplookup_climb_mount(struct cache_fpl *fpl)
{
struct mount *mp, *prev_mp;
@@ -3457,9 +3457,8 @@ cache_fplookup_climb_mount(struct cache_fpl *fpl)
vp = fpl->tvp;
vp_seqc = fpl->tvp_seqc;
- if (vp->v_type != VDIR)
- return (0);
+ VNPASS(vp->v_type == VDIR || vp->v_type == VBAD, vp);
mp = atomic_load_ptr(&vp->v_mountedhere);
if (mp == NULL)
return (0);
@@ -3503,6 +3502,26 @@ cache_fplookup_climb_mount(struct cache_fpl *fpl)
return (0);
}
+static bool
+cache_fplookup_need_climb_mount(struct cache_fpl *fpl)
+{
+ struct mount *mp;
+ struct vnode *vp;
+
+ vp = fpl->tvp;
+
+ /*
+ * Hack: while this is a union, the pointer tends to be NULL so save on
+ * a branch.
+ */
+ mp = atomic_load_ptr(&vp->v_mountedhere);
+ if (mp == NULL)
+ return (false);
+ if (vp->v_type == VDIR)
+ return (true);
+ return (false);
+}
+
/*
* Parse the path.
*
@@ -3689,9 +3708,11 @@ cache_fplookup_impl(struct vnode *dvp, struct cache_fpl *fpl)
VNPASS(!seqc_in_modify(fpl->tvp_seqc), fpl->tvp);
- error = cache_fplookup_climb_mount(fpl);
- if (__predict_false(error != 0)) {
- break;
+ if (cache_fplookup_need_climb_mount(fpl)) {
+ error = cache_fplookup_climb_mount(fpl);
+ if (__predict_false(error != 0)) {
+ break;
+ }
}
VNPASS(!seqc_in_modify(fpl->tvp_seqc), fpl->tvp);
From 8a7ec170952a35f12b89d56b83dde95a52fb56e9 Mon Sep 17 00:00:00 2001
From: Mateusz Guzik
Date: Sat, 1 Aug 2020 06:35:18 +0000
Subject: [PATCH 009/141] cache: reshuffle struct cache_fpl and nameidata_saved
Shaves 16 bytes.
---
sys/kern/vfs_cache.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index fe4739d165e4..72cf7522ed48 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -2890,24 +2890,24 @@ cache_fpl_handle_root(struct nameidata *ndp, struct vnode **dpp)
* need restoring in case fast path lookup fails.
*/
struct nameidata_saved {
- int cn_flags;
long cn_namelen;
char *cn_nameptr;
size_t ni_pathlen;
+ int cn_flags;
};
struct cache_fpl {
- int line;
- enum cache_fpl_status status;
- bool in_smr;
struct nameidata *ndp;
- struct nameidata_saved snd;
struct componentname *cnp;
- struct vnode *dvp;
- seqc_t dvp_seqc;
- struct vnode *tvp;
- seqc_t tvp_seqc;
struct pwd *pwd;
+ struct vnode *dvp;
+ struct vnode *tvp;
+ seqc_t dvp_seqc;
+ seqc_t tvp_seqc;
+ struct nameidata_saved snd;
+ int line;
+ enum cache_fpl_status status:8;
+ bool in_smr;
};
static void
From d53c862742a86e0ac160414bf10620846c0ea7a4 Mon Sep 17 00:00:00 2001
From: Mateusz Guzik
Date: Sat, 1 Aug 2020 06:37:26 +0000
Subject: [PATCH 010/141] Bump __FreeBSD_version after making rights mandatory
for NDINIT_ALL
---
sys/sys/param.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/sys/param.h b/sys/sys/param.h
index e196d4038feb..074ad41645c4 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -60,7 +60,7 @@
* in the range 5 to 9.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1300102 /* Master, propagated to newvers */
+#define __FreeBSD_version 1300103 /* Master, propagated to newvers */
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
From 208fb7e5cf3154ed506a7ed8d4d4b1b6e100ce26 Mon Sep 17 00:00:00 2001
From: Michal Meloun
Date: Sat, 1 Aug 2020 09:06:16 +0000
Subject: [PATCH 011/141] Add missing dependency for cpsw module.
Reported by: mjg
MFC with: r363700
---
sys/modules/cpsw/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/modules/cpsw/Makefile b/sys/modules/cpsw/Makefile
index 130a659a11b9..de6e57c37466 100644
--- a/sys/modules/cpsw/Makefile
+++ b/sys/modules/cpsw/Makefile
@@ -3,6 +3,6 @@
.PATH: ${SRCTOP}/sys/arm/ti/cpsw
KMOD= if_cpsw
-SRCS= if_cpsw.c device_if.h bus_if.h ofw_bus_if.h miibus_if.h
+SRCS= if_cpsw.c device_if.h bus_if.h ofw_bus_if.h miibus_if.h syscon_if.h
.include
From acdc9154615de09e89a6469fbb8af281c334e044 Mon Sep 17 00:00:00 2001
From: Marcin Wojtas
Date: Sat, 1 Aug 2020 09:40:19 +0000
Subject: [PATCH 012/141] Fix TX csum handling in if_mvneta
The mvneta device requires MVNETA_TX_CMD_L4_CHECKSUM_NONE bit to be set in the tx descriptor is checksum not required. However, mvneta_tx_set_csumflag() is not setting this flag currently, causing the hardware to randomly corrupt IP header during transmission.
This affects injected IPv4 packets that skips kernel IP stack processing (e.g. DHCP), as well as all IPv6 packets, since the driver currently does not offload csum for IPv6.
The fix is to remove all the early return paths from mvneta_tx_set_csumflag() which do not set the MVNETA_TX_CMD_L4_CHECKSUM_NONE flag.
PR: 248306
Submitted by: Mike Cui
Reported by: Mike Cui
---
sys/dev/neta/if_mvneta.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/sys/dev/neta/if_mvneta.c b/sys/dev/neta/if_mvneta.c
index fbf7ade862c4..c5cdf8bcb9ee 100644
--- a/sys/dev/neta/if_mvneta.c
+++ b/sys/dev/neta/if_mvneta.c
@@ -2828,18 +2828,15 @@ mvneta_tx_set_csumflag(struct ifnet *ifp,
csum_flags = ifp->if_hwassist & m->m_pkthdr.csum_flags;
eh = mtod(m, struct ether_header *);
- if (csum_flags == 0)
- return;
-
switch (ntohs(eh->ether_type)) {
case ETHERTYPE_IP:
ipoff = ETHER_HDR_LEN;
break;
- case ETHERTYPE_IPV6:
- return;
case ETHERTYPE_VLAN:
ipoff = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN;
break;
+ default:
+ csum_flags = 0;
}
if (__predict_true(csum_flags & (CSUM_IP|CSUM_IP_TCP|CSUM_IP_UDP))) {
From 936c24fabaf5f532b16489d03e88350c3cee4cc7 Mon Sep 17 00:00:00 2001
From: Mateusz Guzik
Date: Sat, 1 Aug 2020 16:02:32 +0000
Subject: [PATCH 013/141] cred: add more asserts for td_realucred == td_ucred
---
sys/kern/kern_prot.c | 4 +++-
sys/kern/kern_thread.c | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 3dbf3e19acbe..20995223b6d2 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1881,7 +1881,8 @@ crunuse(struct thread *td)
{
struct ucred *cr, *crold;
- cr = td->td_ucred;
+ MPASS(td->td_realucred == td->td_ucred);
+ cr = td->td_realucred;
mtx_lock(&cr->cr_mtx);
cr->cr_ref += td->td_ucredref;
td->td_ucredref = 0;
@@ -1897,6 +1898,7 @@ crunuse(struct thread *td)
crold = NULL;
}
mtx_unlock(&cr->cr_mtx);
+ td->td_realucred = NULL;
return (crold);
}
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index 8216c31ef0c0..37120a06d1e2 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -543,6 +543,7 @@ thread_exit(void)
(long)p->p_pid, td->td_name);
SDT_PROBE0(proc, , , lwp__exit);
KASSERT(TAILQ_EMPTY(&td->td_sigqueue.sq_list), ("signal pending"));
+ MPASS(td->td_realucred == td->td_ucred);
/*
* drop FPU & debug register state storage, or any other
From 9da903e5d3fa686b67df0c8d460fcf3ca9444172 Mon Sep 17 00:00:00 2001
From: Conrad Meyer
Date: Sun, 2 Aug 2020 16:34:27 +0000
Subject: [PATCH 014/141] Unlocked getblk: Fix new false-positive assertion
A free buf's lock may be held (temporarily) due to unlocked lookup, so
buf_alloc() must acquire it without LK_NOWAIT. The unlocked getblk path
should unlock it promptly once it realizes the identity does not match
the buffer it was searching for.
Reported by: gallatin
Reviewed by: kib
Tested by: pho
X-MFC-With: r363482
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D25914
---
sys/kern/vfs_bio.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 524554cdd48f..adc44082d972 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1637,7 +1637,7 @@ static struct buf *
buf_alloc(struct bufdomain *bd)
{
struct buf *bp;
- int freebufs;
+ int freebufs, error;
/*
* We can only run out of bufs in the buf zone if the average buf
@@ -1660,8 +1660,10 @@ buf_alloc(struct bufdomain *bd)
if (freebufs == bd->bd_lofreebuffers)
bufspace_daemon_wakeup(bd);
- if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) != 0)
- panic("getnewbuf_empty: Locked buf %p on free queue.", bp);
+ error = BUF_LOCK(bp, LK_EXCLUSIVE, NULL);
+ KASSERT(error == 0, ("%s: BUF_LOCK on free buf %p: %d.", __func__, bp,
+ error));
+ (void)error;
KASSERT(bp->b_vp == NULL,
("bp: %p still has vnode %p.", bp, bp->b_vp));
From ea27bce3361c81978292e5596f791ef6e4e64e3e Mon Sep 17 00:00:00 2001
From: Mateusz Piotrowski <0mp@FreeBSD.org>
Date: Sun, 2 Aug 2020 16:41:36 +0000
Subject: [PATCH 015/141] Document automatic handling of font height for BDF
files
PR: 248395
Submitted by: Dmitry Wagin
Reviewed by: bcr, emaste, tsoome
Differential Revision: https://reviews.freebsd.org/D25907
---
usr.bin/vtfontcvt/vtfontcvt.8 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/usr.bin/vtfontcvt/vtfontcvt.8 b/usr.bin/vtfontcvt/vtfontcvt.8
index e585220d5dfa..451f8134181b 100644
--- a/usr.bin/vtfontcvt/vtfontcvt.8
+++ b/usr.bin/vtfontcvt/vtfontcvt.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd Mar 10, 2020
+.Dd August 2, 2020
.Dt VTFONTCVT 8
.Os
.Sh NAME
@@ -63,7 +63,7 @@ file.
.It Fl h Ar height
Set font height.
The default is 16.
-Font height is set automatically for HEX files that have a
+Font height is set automatically for BDF files and for HEX files that have a
.Ql # Height: Ar height
comment before any font data.
.It Fl n
@@ -75,7 +75,7 @@ Display verbose statistics about the converted font.
.It Fl w Ar width
Set font width.
The default is 8.
-Font width is set automatically for HEX files that have a
+Font width is set automatically for BDF files and for HEX files that have a
.Ql # Width: Ar width
comment before any font data.
.El
From c7b00f0071ae5454acfe9863c46c33539d536825 Mon Sep 17 00:00:00 2001
From: Mateusz Piotrowski <0mp@FreeBSD.org>
Date: Sun, 2 Aug 2020 16:59:14 +0000
Subject: [PATCH 016/141] core(5) appeared in Version 1 AT&T UNIX
Based on the scans of manual pages available at
https://www.bell-labs.com/usr/dmr/www/man51.pdf,
which are a part of the following collection:
https://www.bell-labs.com/usr/dmr/www/1stEdman.html.
Obtained from: NetBSD
Differential Revision: https://reviews.freebsd.org/D25849
---
share/man/man5/core.5 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/share/man/man5/core.5 b/share/man/man5/core.5
index c7449637b910..500da31a310c 100644
--- a/share/man/man5/core.5
+++ b/share/man/man5/core.5
@@ -28,7 +28,7 @@
.\" @(#)core.5 8.3 (Berkeley) 12/11/93
.\" $FreeBSD$
.\"
-.Dd February 13, 2018
+.Dd August 2, 2020
.Dt CORE 5
.Os
.Sh NAME
@@ -171,4 +171,4 @@ command can be used:
A
.Nm
file format appeared in
-.At v6 .
+.At v1 .
From 838984de32be2b16354523d62e33a751ad2c519d Mon Sep 17 00:00:00 2001
From: Mateusz Guzik
Date: Sun, 2 Aug 2020 19:42:06 +0000
Subject: [PATCH 017/141] vfs: move namecache initialisation into
cache_vnode_init
---
sys/kern/vfs_cache.c | 9 +++++++++
sys/kern/vfs_subr.c | 3 +--
sys/sys/vnode.h | 1 +
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 72cf7522ed48..00215fc014cd 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -2070,6 +2070,15 @@ nchinit(void *dummy __unused)
}
SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL);
+void
+cache_vnode_init(struct vnode *vp)
+{
+
+ LIST_INIT(&vp->v_cache_src);
+ TAILQ_INIT(&vp->v_cache_dst);
+ vp->v_cache_dd = NULL;
+}
+
void
cache_changesize(u_long newmaxvnodes)
{
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index d7a69b49d7f0..a34f83c09860 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -563,8 +563,7 @@ vnode_init(void *mem, int size, int flags)
/*
* Initialize namecache.
*/
- LIST_INIT(&vp->v_cache_src);
- TAILQ_INIT(&vp->v_cache_dst);
+ cache_vnode_init(vp);
/*
* Initialize rangelocks.
*/
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 3a83ea5af6e1..983e4ac3a531 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -635,6 +635,7 @@ void cache_enter_time(struct vnode *dvp, struct vnode *vp,
struct timespec *dtsp);
int cache_lookup(struct vnode *dvp, struct vnode **vpp,
struct componentname *cnp, struct timespec *tsp, int *ticksp);
+void cache_vnode_init(struct vnode *vp);
void cache_purge(struct vnode *vp);
void cache_purge_negative(struct vnode *vp);
void cache_purgevfs(struct mount *mp, bool force);
From b145e389342e51220525bb8fa63e60a48f91011b Mon Sep 17 00:00:00 2001
From: Mateusz Guzik
Date: Sun, 2 Aug 2020 20:00:43 +0000
Subject: [PATCH 018/141] vfs: shorten v_iflag and v_vflag
While here renumber VI_* flags to remove the gaps.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D25921
---
sys/sys/vnode.h | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 983e4ac3a531..bed5c0f4086f 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -107,6 +107,7 @@ struct vnode {
enum vtype v_type:8; /* u vnode type */
short v_irflag; /* i frequently read flags */
seqc_t v_seqc; /* i modification count */
+ uint32_t v_nchash; /* u namecache hash */
struct vop_vector *v_op; /* u vnode operations vector */
void *v_data; /* u private data for fs */
@@ -171,8 +172,8 @@ struct vnode {
u_int v_holdcnt; /* I prevents recycling. */
u_int v_usecount; /* I ref count of users */
- u_int v_iflag; /* i vnode flags (see below) */
- u_int v_vflag; /* v vnode flags */
+ u_short v_iflag; /* i vnode flags (see below) */
+ u_short v_vflag; /* v vnode flags */
u_short v_mflag; /* l mnt-specific vnode flags */
short v_dbatchcpu; /* i LRU requeue deferral batch */
int v_writecount; /* I ref count of writers or
@@ -245,10 +246,10 @@ struct xvnode {
#define VIRF_DOOMED 0x0001 /* This vnode is being recycled */
#define VI_TEXT_REF 0x0001 /* Text ref grabbed use ref */
-#define VI_MOUNT 0x0020 /* Mount in progress */
-#define VI_DOINGINACT 0x0800 /* VOP_INACTIVE is in progress */
-#define VI_OWEINACT 0x1000 /* Need to call inactive */
-#define VI_DEFINACT 0x2000 /* deferred inactive */
+#define VI_MOUNT 0x0002 /* Mount in progress */
+#define VI_DOINGINACT 0x0004 /* VOP_INACTIVE is in progress */
+#define VI_OWEINACT 0x0008 /* Need to call inactive */
+#define VI_DEFINACT 0x0010 /* deferred inactive */
#define VV_ROOT 0x0001 /* root of its filesystem */
#define VV_ISTTY 0x0002 /* vnode represents a tty */
From 7ad2f1105ea47a41a1a3fe2a6a8193f208e3d206 Mon Sep 17 00:00:00 2001
From: Mateusz Guzik
Date: Sun, 2 Aug 2020 20:02:06 +0000
Subject: [PATCH 019/141] vfs: store precomputed namecache hash in the vnode
This significantly speeds up path lookup, Cascade Lake doing access(2) on ufs
on /usr/obj/usr/src/amd64.amd64/sys/GENERIC/vnode_if.c, ops/s:
before: 2535298
after: 2797621
Over +10%.
The reversed order of computation here does not seem to matter for hash
distribution.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D25921
---
sys/kern/vfs_cache.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 00215fc014cd..24638d39ee18 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -490,14 +490,22 @@ cache_assert_vnode_locked(struct vnode *vp)
cache_assert_vlp_locked(vlp);
}
+/*
+ * TODO: With the value stored we can do better than computing the hash based
+ * on the address and the choice of FNV should also be revisisted.
+ */
+static void
+cache_prehash(struct vnode *vp)
+{
+
+ vp->v_nchash = fnv_32_buf(&vp, sizeof(vp), FNV1_32_INIT);
+}
+
static uint32_t
cache_get_hash(char *name, u_char len, struct vnode *dvp)
{
- uint32_t hash;
- hash = fnv_32_buf(name, len, FNV1_32_INIT);
- hash = fnv_32_buf(&dvp, sizeof(dvp), hash);
- return (hash);
+ return (fnv_32_buf(name, len, dvp->v_nchash));
}
static inline struct rwlock *
@@ -2077,6 +2085,7 @@ cache_vnode_init(struct vnode *vp)
LIST_INIT(&vp->v_cache_src);
TAILQ_INIT(&vp->v_cache_dst);
vp->v_cache_dd = NULL;
+ cache_prehash(vp);
}
void
From 9fce5c4b3ce8580bb441923d0174df797f74a860 Mon Sep 17 00:00:00 2001
From: Mateusz Guzik
Date: Sun, 2 Aug 2020 20:03:23 +0000
Subject: [PATCH 020/141] Bump __FreeBSD_version after vnode layout changes
---
sys/sys/param.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 074ad41645c4..cc2aae21f3ca 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -60,7 +60,7 @@
* in the range 5 to 9.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1300103 /* Master, propagated to newvers */
+#define __FreeBSD_version 1300104 /* Master, propagated to newvers */
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
From 4fdb1b227cf6853f31fb655bc3e327ae16e7f09b Mon Sep 17 00:00:00 2001
From: "Jason A. Harmening"
Date: Sun, 2 Aug 2020 20:18:37 +0000
Subject: [PATCH 021/141] vt(4): CONS_HISTORY/CONS_CLRHIST should operate on
issuing terminal
Currently the CONS_HISTORY and CONS_CLRHIST ioctls modify the state of the
active terminal instead of the terminal against which the ioctl was issued.
Because of the way vidcontrol(1) works, these are the same in most cases.
But a poorly-timed window switch can make them differ. This is reproducible
by issuing e.g. 'vidcontrol -s 2 && vidcontrol -C' to switch from vty 1 to
vty 2; teken will reset the cursor position on vty 1 but vt(4) will clear
the history buffer of vty 2, producing an interesting state of affairs.
Differential Revision: https://reviews.freebsd.org/D25564
---
sys/dev/vt/vt_core.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
index 5311a8bd6788..952dcbbbb6b9 100644
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -454,7 +454,7 @@ vt_window_postswitch(struct vt_window *vw)
return (0);
}
-/* vt_late_window_switch will done VT switching for regular case. */
+/* vt_late_window_switch will do VT switching for regular case. */
static int
vt_late_window_switch(struct vt_window *vw)
{
@@ -2326,12 +2326,11 @@ vtterm_ioctl(struct terminal *tm, u_long cmd, caddr_t data,
case CONS_HISTORY:
if (*(int *)data < 0)
return EINVAL;
- if (*(int *)data != vd->vd_curwindow->vw_buf.vb_history_size)
- vtbuf_sethistory_size(&vd->vd_curwindow->vw_buf,
- *(int *)data);
+ if (*(int *)data != vw->vw_buf.vb_history_size)
+ vtbuf_sethistory_size(&vw->vw_buf, *(int *)data);
return (0);
case CONS_CLRHIST:
- vtbuf_clearhistory(&vd->vd_curwindow->vw_buf);
+ vtbuf_clearhistory(&vw->vw_buf);
/*
* Invalidate the entire visible window; it is not guaranteed
* that this operation will be immediately followed by a scroll
@@ -2339,9 +2338,11 @@ vtterm_ioctl(struct terminal *tm, u_long cmd, caddr_t data,
* to remain visible.
*/
VT_LOCK(vd);
- vd->vd_flags |= VDF_INVALID;
+ if (vw == vd->vd_curwindow) {
+ vd->vd_flags |= VDF_INVALID;
+ vt_resume_flush_timer(vw, 0);
+ }
VT_UNLOCK(vd);
- vt_resume_flush_timer(vd->vd_curwindow, 0);
return (0);
case CONS_GET:
/* XXX */
From 31e34625cafcb33789b7fd95fa6ab15ddf91b1d0 Mon Sep 17 00:00:00 2001
From: Andrew Turner
Date: Mon, 3 Aug 2020 10:19:50 +0000
Subject: [PATCH 022/141] Handle Raspberry Pi 4 xhci firmware loading.
The newer hardware revisions of the Raspberry Pi 4 removed the ability of
the VIA VL805 xhci controller to load its own firmware. Instead the
firmware must be installed at the appropriate time by the VideoCore
coprocessor.
Submitted by: Robert Crowston
Differential Revision: https://reviews.freebsd.org/D25261
---
sys/arm/broadcom/bcm2835/bcm2835_mbox.c | 23 +-
sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h | 18 ++
sys/arm/broadcom/bcm2835/bcm2838_xhci.c | 217 +++++++++++++++++++
sys/arm/broadcom/bcm2835/files.bcm283x | 1 +
sys/conf/files.arm64 | 1 +
sys/dev/usb/controller/xhci.h | 3 +
sys/dev/usb/controller/xhci_pci.c | 12 +-
7 files changed, 266 insertions(+), 9 deletions(-)
create mode 100644 sys/arm/broadcom/bcm2835/bcm2838_xhci.c
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_mbox.c b/sys/arm/broadcom/bcm2835/bcm2835_mbox.c
index d722c7aae7a7..9d71399de861 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_mbox.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_mbox.c
@@ -397,10 +397,10 @@ int
bcm2835_mbox_property(void *msg, size_t msg_size)
{
struct bcm_mbox_softc *sc;
- struct msg_set_power_state *buf;
bus_dma_tag_t msg_tag;
bus_dmamap_t msg_map;
bus_addr_t msg_phys;
+ char *buf;
uint32_t reg;
device_t mbox;
int err;
@@ -467,6 +467,26 @@ bcm2835_mbox_set_power_state(uint32_t device_id, boolean_t on)
return (err);
}
+int
+bcm2835_mbox_notify_xhci_reset(uint32_t pci_dev_addr)
+{
+ struct msg_notify_xhci_reset msg;
+ int err;
+
+ memset(&msg, 0, sizeof(msg));
+ msg.hdr.buf_size = sizeof(msg);
+ msg.hdr.code = BCM2835_MBOX_CODE_REQ;
+ msg.tag_hdr.tag = BCM2835_MBOX_TAG_NOTIFY_XHCI_RESET;
+ msg.tag_hdr.val_buf_size = sizeof(msg.body);
+ msg.tag_hdr.val_len = sizeof(msg.body.req);
+ msg.body.req.pci_device_addr = pci_dev_addr;
+ msg.end_tag = 0;
+
+ err = bcm2835_mbox_property(&msg, sizeof(msg));
+
+ return (err);
+}
+
int
bcm2835_mbox_get_clock_rate(uint32_t clock_id, uint32_t *hz)
{
@@ -572,3 +592,4 @@ bcm2835_mbox_fb_init(struct bcm2835_fb_config *fb)
return (err);
}
+
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h b/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h
index 15f48aefa536..92496c5aae92 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h
+++ b/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h
@@ -112,6 +112,24 @@ struct msg_set_power_state {
/* Sets the power state for a given device */
int bcm2835_mbox_set_power_state(uint32_t, boolean_t);
+#define BCM2835_MBOX_TAG_NOTIFY_XHCI_RESET 0x00030058
+
+struct msg_notify_xhci_reset {
+ struct bcm2835_mbox_hdr hdr;
+ struct bcm2835_mbox_tag_hdr tag_hdr;
+ union {
+ struct {
+ uint32_t pci_device_addr;
+ } req;
+ struct {
+ } resp;
+ } body;
+ uint32_t end_tag;
+};
+
+/* Prompts the VideoCore processor to reload the xhci firmware. */
+int bcm2835_mbox_notify_xhci_reset(uint32_t);
+
#define BCM2835_MBOX_CLOCK_ID_EMMC 0x00000001
#define BCM2838_MBOX_CLOCK_ID_EMMC2 0x0000000c
diff --git a/sys/arm/broadcom/bcm2835/bcm2838_xhci.c b/sys/arm/broadcom/bcm2835/bcm2838_xhci.c
new file mode 100644
index 000000000000..29bc73691a47
--- /dev/null
+++ b/sys/arm/broadcom/bcm2835/bcm2838_xhci.c
@@ -0,0 +1,217 @@
+/*-
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2020 Dr Robert Harvey Crowston
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ * $FreeBSD$
+ *
+ */
+
+/*
+ * VIA VL805 controller on the Raspberry Pi 4.
+ * The VL805 is a generic xhci controller. However, in the newer hardware
+ * revisions of the Raspberry Pi 4, it is incapable of loading its own firmware.
+ * Instead, the VideoCore GPU must load the firmware into the controller at the
+ * appropriate time. This driver is a shim that pre-loads the firmware before
+ * handing control to the xhci generic driver.
+ */
+
+#include
+__FBSDID("$FreeBSD$");
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+#include
+
+#define VL805_FIRMWARE_REG 0x50
+#define PCIE_BUS_SHIFT 20
+#define PCIE_SLOT_SHIFT 15
+#define PCIE_FUNC_SHIFT 12
+
+static int
+bcm_xhci_probe(device_t dev)
+{
+ phandle_t root;
+ uint32_t device_id;
+
+ device_id = pci_get_devid(dev);
+ if (device_id != 0x34831106) /* VIA VL805 USB 3.0 controller. */
+ return (ENXIO);
+
+ /*
+ * The VIA chip is not unique to the Pi, but we only want to use this
+ * driver if the SoC is a Raspberry Pi 4. Walk the device tree to
+ * discover if the system is a Pi 4.
+ */
+ root = OF_finddevice("/");
+ if (root == -1)
+ return (ENXIO);
+ if (!ofw_bus_node_is_compatible(root, "raspberrypi,4-model-b"))
+ return (ENXIO);
+
+ /*
+ * On the Pi 4, the VIA chip with the firmware-loading limitation is
+ * soldered-on to a particular bus/slot/function. But, it's possible a
+ * user could desolder the VIA chip, replace it with a pci-pci bridge,
+ * then plug in a commodity VIA PCI-e card on the new bridge. In that
+ * case we don't want to try to load the firmware to a commodity
+ * expansion card.
+ */
+ if (pci_get_bus(dev) != 1 || pci_get_slot(dev) != 0 ||
+ pci_get_function(dev) != 0 )
+ return (ENXIO);
+
+ device_set_desc(dev,
+ "VL805 USB 3.0 controller (on the Raspberry Pi 4b)");
+
+ return (BUS_PROBE_SPECIFIC);
+}
+
+static uint32_t
+bcm_xhci_check_firmware(device_t dev, bool expect_loaded)
+{
+ uint32_t revision;
+ bool loaded;
+
+ revision = pci_read_config(dev, VL805_FIRMWARE_REG, 4);
+ loaded = !(revision == 0 || revision == 0xffffffff);
+
+ if (expect_loaded && !loaded)
+ device_printf(dev, "warning: xhci firmware not found.\n");
+ else if (bootverbose && !loaded)
+ device_printf(dev, "note: xhci firmware not found.\n");
+ else if (bootverbose)
+ device_printf(dev,
+ "note: xhci firmware detected; firmware is revision %x.\n",
+ revision);
+
+ if (!loaded)
+ return 0;
+
+ return (revision);
+}
+
+static void
+bcm_xhci_install_xhci_firmware(device_t dev)
+{
+ uint32_t revision, dev_addr;
+ int error;
+
+ revision = bcm_xhci_check_firmware(dev, false);
+ if (revision > 0) {
+ /*
+ * With the pre-June 2020 boot firmware, it does not seem
+ * possible to reload already-installed xhci firmware.
+ */
+ return;
+ }
+
+ /*
+ * Notify the VideoCore gpu processor that it needs to reload the xhci
+ * firmware into the xhci controller. This needs to happen after the pci
+ * bridge topology is registered with the controller.
+ */
+ if (bootverbose)
+ device_printf(dev, "note: installing xhci firmware.\n");
+
+ dev_addr =
+ pci_get_bus(dev) << PCIE_BUS_SHIFT |
+ pci_get_slot(dev) << PCIE_SLOT_SHIFT |
+ pci_get_function(dev) << PCIE_FUNC_SHIFT;
+
+ error = bcm2835_mbox_notify_xhci_reset(dev_addr);
+ if (error)
+ device_printf(dev,
+ "warning: xhci firmware install failed (error %d).\n",
+ error);
+
+ DELAY(1000);
+ bcm_xhci_check_firmware(dev, true);
+
+ return;
+}
+
+static int
+bcm_xhci_attach(device_t dev)
+{
+ struct xhci_softc *sc;
+ int error;
+
+ sc = device_get_softc(dev);
+
+ bcm_xhci_install_xhci_firmware(dev);
+
+ error = xhci_pci_attach(dev);
+ if (error)
+ return (error);
+
+ /* 32 bit DMA is a limitation of the PCI-e controller, not the VL805. */
+ sc->sc_bus.dma_bits = 32;
+ if (bootverbose)
+ device_printf(dev, "note: switched to 32-bit DMA.\n");
+
+ return (0);
+}
+
+/*
+ * Device method table.
+ */
+static device_method_t bcm_xhci_methods[] = {
+ /* Device interface. */
+ DEVMETHOD(device_probe, bcm_xhci_probe),
+ DEVMETHOD(device_attach, bcm_xhci_attach),
+};
+
+DEFINE_CLASS_1(bcm_xhci, bcm_xhci_driver, bcm_xhci_methods,
+ sizeof(struct xhci_softc), xhci_pci_driver);
+
+static devclass_t xhci_devclass;
+DRIVER_MODULE(bcm_xhci, pci, bcm_xhci_driver, xhci_devclass, 0, 0); MODULE_DEPEND(bcm_xhci, usb, 1, 1, 1);
+
diff --git a/sys/arm/broadcom/bcm2835/files.bcm283x b/sys/arm/broadcom/bcm2835/files.bcm283x
index d4faae8e338c..0af397566c17 100644
--- a/sys/arm/broadcom/bcm2835/files.bcm283x
+++ b/sys/arm/broadcom/bcm2835/files.bcm283x
@@ -19,6 +19,7 @@ arm/broadcom/bcm2835/bcm2835_vcbus.c standard
arm/broadcom/bcm2835/bcm2835_vcio.c standard
arm/broadcom/bcm2835/bcm2835_wdog.c standard
arm/broadcom/bcm2835/bcm2838_pci.c optional pci
+arm/broadcom/bcm2835/bcm2838_xhci.c optional xhci
arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt
dev/mbox/mbox_if.m standard
diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64
index 44155655a7ba..e8a0cfc95f0d 100644
--- a/sys/conf/files.arm64
+++ b/sys/conf/files.arm64
@@ -107,6 +107,7 @@ arm/broadcom/bcm2835/bcm2835_wdog.c optional soc_brcm_bcm2837 fdt | soc_brcm_bc
arm/broadcom/bcm2835/bcm2836.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt
arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt soc_brcm_bcm2837 | dwcotg fdt soc_brcm_bcm2838
arm/broadcom/bcm2835/bcm2838_pci.c optional soc_brcm_bcm2838 fdt pci
+arm/broadcom/bcm2835/bcm2838_xhci.c optional soc_brcm_bcm2838 fdt pci xhci
arm/freescale/vybrid/vf_i2c.c optional vf_i2c iicbus SOC_NXP_LS
arm/mv/a37x0_gpio.c optional a37x0_gpio gpio fdt
arm/mv/a37x0_iic.c optional a37x0_iic iicbus fdt
diff --git a/sys/dev/usb/controller/xhci.h b/sys/dev/usb/controller/xhci.h
index 6bfd342e0620..c0427e0cf11f 100644
--- a/sys/dev/usb/controller/xhci.h
+++ b/sys/dev/usb/controller/xhci.h
@@ -544,5 +544,8 @@ usb_error_t xhci_init(struct xhci_softc *, device_t, uint8_t);
usb_error_t xhci_start_controller(struct xhci_softc *);
void xhci_interrupt(struct xhci_softc *);
void xhci_uninit(struct xhci_softc *);
+int xhci_pci_attach(device_t);
+
+DECLARE_CLASS(xhci_pci_driver);
#endif /* _XHCI_H_ */
diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c
index 5c59d7c989dc..15677c23b785 100644
--- a/sys/dev/usb/controller/xhci_pci.c
+++ b/sys/dev/usb/controller/xhci_pci.c
@@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$");
#include "usb_if.h"
static device_probe_t xhci_pci_probe;
-static device_attach_t xhci_pci_attach;
static device_detach_t xhci_pci_detach;
static usb_take_controller_t xhci_pci_take_controller;
@@ -80,15 +79,12 @@ static device_method_t xhci_device_methods[] = {
DEVMETHOD_END
};
-static driver_t xhci_driver = {
- .name = "xhci",
- .methods = xhci_device_methods,
- .size = sizeof(struct xhci_softc),
-};
+DEFINE_CLASS_0(xhci, xhci_pci_driver, xhci_device_methods,
+ sizeof(struct xhci_softc));
static devclass_t xhci_devclass;
-DRIVER_MODULE(xhci, pci, xhci_driver, xhci_devclass, NULL, NULL);
+DRIVER_MODULE(xhci, pci, xhci_pci_driver, xhci_devclass, NULL, NULL);
MODULE_DEPEND(xhci, usb, 1, 1, 1);
static const char *
@@ -223,7 +219,7 @@ xhci_pci_port_route(device_t self, uint32_t set, uint32_t clear)
return (0);
}
-static int
+int
xhci_pci_attach(device_t self)
{
struct xhci_softc *sc = device_get_softc(self);
From 7393b267c6ceb3afd573e207587f49507154ead8 Mon Sep 17 00:00:00 2001
From: Kristof Provost
Date: Mon, 3 Aug 2020 12:48:51 +0000
Subject: [PATCH 023/141] libc: Provide sub fp(s|g)etmask() implementations for
RISC-V
RISC-V doesn't support floating-point exceptions.
RISC-V Instruction Set Manual: Volume I: User-Level ISA, 11.2 Floating-Point
Control and Status Register: "As allowed by the standard, we do not support
traps on floating-point exceptions in the base ISA, but instead require
explicit checks of the flags in software. We considered adding branches
controlled directly by the contents of the floating-point accrued exception
flags, but ultimately chose to omit these instructions to keep the ISA simple."
We still need these functions, because some applications (notably Perl) call
them, but we cannot provide a meaningful implementation.
Sponsored by: Axiado
Differential Revision: https://reviews.freebsd.org/D25740
---
lib/libc/riscv/gen/Makefile.inc | 2 ++
lib/libc/riscv/gen/fpgetmask.c | 41 +++++++++++++++++++++++++
lib/libc/riscv/gen/fpsetmask.c | 53 +++++++++++++++++++++++++++++++++
sys/riscv/include/ieeefp.h | 1 +
4 files changed, 97 insertions(+)
create mode 100644 lib/libc/riscv/gen/fpgetmask.c
create mode 100644 lib/libc/riscv/gen/fpsetmask.c
diff --git a/lib/libc/riscv/gen/Makefile.inc b/lib/libc/riscv/gen/Makefile.inc
index 6380db6c265a..f13800829d7f 100644
--- a/lib/libc/riscv/gen/Makefile.inc
+++ b/lib/libc/riscv/gen/Makefile.inc
@@ -3,6 +3,8 @@
SRCS+= _ctx_start.S \
fabs.S \
flt_rounds.c \
+ fpgetmask.c \
+ fpsetmask.c \
infinity.c \
ldexp.c \
makecontext.c \
diff --git a/lib/libc/riscv/gen/fpgetmask.c b/lib/libc/riscv/gen/fpgetmask.c
new file mode 100644
index 000000000000..f461cc2ba10e
--- /dev/null
+++ b/lib/libc/riscv/gen/fpgetmask.c
@@ -0,0 +1,41 @@
+/*-
+ * Copyright (c) 2020 Axiado
+ * All rights reserved.
+ *
+ * This software was developed by Kristof Provost under
+ * sponsorship from Axiado.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include
+__FBSDID("$FreeBSD$");
+
+#include
+#include
+
+fp_except_t
+fpgetmask(void)
+{
+
+ return (0);
+}
diff --git a/lib/libc/riscv/gen/fpsetmask.c b/lib/libc/riscv/gen/fpsetmask.c
new file mode 100644
index 000000000000..6eeac9de8bef
--- /dev/null
+++ b/lib/libc/riscv/gen/fpsetmask.c
@@ -0,0 +1,53 @@
+/*-
+ * Copyright (c) 2020 Axiado
+ * All rights reserved.
+ *
+ * This software was developed by Kristof Provost under
+ * sponsorship from Axiado.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include
+__FBSDID("$FreeBSD$");
+
+#include
+#include
+
+/**
+ * RISC-V doesn't support floating-point exceptions: RISC-V Instruction Set
+ * Manual: Volume I: User-Level ISA, 11.2 Floating-Point Control and Status
+ * Register: "As allowed by the standard, we do not support traps on
+ * floating-point exceptions in the base ISA, but instead require explicit
+ * checks of the flags in software. We considered adding branches controlled
+ * directly by the contents of the floating-point accrued exception flags, but
+ * ultimately chose to omit these instructions to keep the ISA simple."
+ *
+ * We still need this function, because some applications (notably Perl) call
+ * it, but we cannot provide a meaningful implementation.
+ **/
+fp_except_t
+fpsetmask(fp_except_t mask)
+{
+
+ return (0);
+}
diff --git a/sys/riscv/include/ieeefp.h b/sys/riscv/include/ieeefp.h
index f7d44f3a0daf..72a48f4f9b74 100644
--- a/sys/riscv/include/ieeefp.h
+++ b/sys/riscv/include/ieeefp.h
@@ -4,5 +4,6 @@
#define _MACHINE_IEEEFP_H_
/* TODO */
+typedef int fp_except_t;
#endif /* _MACHINE_IEEEFP_H_ */
From 7dd966b1420cde0b9e4351f686622eb8c9741ec3 Mon Sep 17 00:00:00 2001
From: Li-Wen Hsu
Date: Mon, 3 Aug 2020 12:51:14 +0000
Subject: [PATCH 024/141] Disable tests failing after r363679
PR: 248452
Sponsored by: The FreeBSD Foundation
---
contrib/googletest/googletest/test/googletest-port-test.cc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/contrib/googletest/googletest/test/googletest-port-test.cc b/contrib/googletest/googletest/test/googletest-port-test.cc
index 399316f95b63..0b68d72e75bc 100644
--- a/contrib/googletest/googletest/test/googletest-port-test.cc
+++ b/contrib/googletest/googletest/test/googletest-port-test.cc
@@ -403,6 +403,8 @@ typedef testing::Types<
TYPED_TEST_CASE(RETest, StringTypes);
// Tests RE's implicit constructors.
+/*
+https://bugs.freebsd.org/248452
TYPED_TEST(RETest, ImplicitConstructorWorks) {
const RE empty(TypeParam(""));
EXPECT_STREQ("", empty.pattern());
@@ -413,6 +415,7 @@ TYPED_TEST(RETest, ImplicitConstructorWorks) {
const RE normal(TypeParam(".*(\\w+)"));
EXPECT_STREQ(".*(\\w+)", normal.pattern());
}
+*/
// Tests that RE's constructors reject invalid regular expressions.
TYPED_TEST(RETest, RejectsInvalidRegex) {
@@ -861,6 +864,8 @@ TEST(MatchRegexAnywhereTest, ReturnsTrueWhenMatchingNonPrefix) {
}
// Tests RE's implicit constructors.
+/*
+https://bugs.freebsd.org/248452
TEST(RETest, ImplicitConstructorWorks) {
const RE empty("");
EXPECT_STREQ("", empty.pattern());
@@ -868,6 +873,7 @@ TEST(RETest, ImplicitConstructorWorks) {
const RE simple("hello");
EXPECT_STREQ("hello", simple.pattern());
}
+*/
// Tests that RE's constructors reject invalid regular expressions.
TEST(RETest, RejectsInvalidRegex) {
From 8c72577900e317393dc43be3df159e0dd4036ddc Mon Sep 17 00:00:00 2001
From: Mateusz Piotrowski <0mp@FreeBSD.org>
Date: Mon, 3 Aug 2020 13:12:07 +0000
Subject: [PATCH 025/141] Do not mention portsnap(8) in ports.7
As we are moving away from portsnap,
let's not recommend it in the manual page.
Reviewed by: bcr (manpages), mat (portmgr)
Differential Revision: https://reviews.freebsd.org/D25847
---
share/man/man7/ports.7 | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7
index eb65d117bded..3a9fe60aa018 100644
--- a/share/man/man7/ports.7
+++ b/share/man/man7/ports.7
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 17, 2020
+.Dd August 3, 2020
.Dt PORTS 7
.Os
.Sh NAME
@@ -70,9 +70,7 @@ branch contains all the latest changes, while the
branches only provide critical fixes.
The
.Em head
-branch can be installed or updated using either
-.Xr portsnap 8 ,
-or from Subversion repository at:
+branch can be installed or updated from the Subversion repository located at:
.Pp
.Lk https://svn.FreeBSD.org/ports/head
.Pp
@@ -626,8 +624,7 @@ is going to be built with Python 3.7 support.)
.Xr make 1 ,
.Xr make.conf 5 ,
.Xr development 7 ,
-.Xr pkg 7 ,
-.Xr portsnap 8
+.Xr pkg 7
.Pp
Additional developer documentation:
.Bl -dash -width "" -offset indent
From bc9b178cd01a5ce7642ade237975e44b096413a8 Mon Sep 17 00:00:00 2001
From: Andrew Turner
Date: Mon, 3 Aug 2020 16:26:10 +0000
Subject: [PATCH 026/141] Allow child classes of simplebus to call attach
directly
Reduce code duplication when a bus is subclassed from simplebus by allowing
them to call simplebus_attach directly. This is useful when the child bus
will just implement the same calls.
As not all children will expect to have a ranges property, e.g. the
Raspberry Pi firmware, allow this property to be missing.
Reviewed by: manu
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D25925
---
sys/dev/fdt/simplebus.c | 6 +++---
sys/dev/fdt/simplebus.h | 5 +++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/sys/dev/fdt/simplebus.c b/sys/dev/fdt/simplebus.c
index 2f4fa8608626..60387a9e7a81 100644
--- a/sys/dev/fdt/simplebus.c
+++ b/sys/dev/fdt/simplebus.c
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
* Bus interface.
*/
static int simplebus_probe(device_t dev);
-static int simplebus_attach(device_t dev);
static struct resource *simplebus_alloc_resource(device_t, device_t, int,
int *, rman_res_t, rman_res_t, rman_res_t, u_int);
static void simplebus_probe_nomatch(device_t bus, device_t child);
@@ -134,7 +133,7 @@ simplebus_probe(device_t dev)
return (BUS_PROBE_GENERIC);
}
-static int
+int
simplebus_attach(device_t dev)
{
struct simplebus_softc *sc;
@@ -142,7 +141,8 @@ simplebus_attach(device_t dev)
sc = device_get_softc(dev);
simplebus_init(dev, 0);
- if (simplebus_fill_ranges(sc->node, sc) < 0) {
+ if ((sc->flags & SB_FLAG_NO_RANGES) == 0 &&
+ simplebus_fill_ranges(sc->node, sc) < 0) {
device_printf(dev, "could not get ranges\n");
return (ENXIO);
}
diff --git a/sys/dev/fdt/simplebus.h b/sys/dev/fdt/simplebus.h
index bc695578e874..b416f1b94cfb 100644
--- a/sys/dev/fdt/simplebus.h
+++ b/sys/dev/fdt/simplebus.h
@@ -47,6 +47,8 @@ struct simplebus_softc {
struct simplebus_range *ranges;
int nranges;
+#define SB_FLAG_NO_RANGES (1 << 0) /* Bus doesn't have ranges property */
+ int flags;
pcell_t acells, scells;
};
@@ -63,4 +65,7 @@ struct simplebus_devinfo *simplebus_setup_dinfo(device_t dev, phandle_t node,
struct simplebus_devinfo *di);
int simplebus_fill_ranges(phandle_t node,
struct simplebus_softc *sc);
+
+int simplebus_attach(device_t dev);
+
#endif /* _FDT_SIMPLEBUS_H */
From 7e077ed00c102a996ec38525225db7a1b3d1dd3d Mon Sep 17 00:00:00 2001
From: Andrew Turner
Date: Mon, 3 Aug 2020 16:43:40 +0000
Subject: [PATCH 027/141] Allow the Raspberry Pi firmware driver to be a bus
There are child nodes in the device tree, e.g. the Raspberry Pi firmware
GPIO device. Add support for this to be a bus so we can attach these
children.
Reviewed by: manu
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D25848
---
sys/arm/broadcom/bcm2835/bcm2835_firmware.c | 24 +++++++++++----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_firmware.c b/sys/arm/broadcom/bcm2835/bcm2835_firmware.c
index 44201ec80f7d..1a061e60a823 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_firmware.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_firmware.c
@@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$");
#include
#include
+#include
+
#include
#include
@@ -47,7 +49,7 @@ __FBSDID("$FreeBSD$");
#include
struct bcm2835_firmware_softc {
- device_t sc_dev;
+ struct simplebus_softc sc;
phandle_t sc_mbox;
};
@@ -82,7 +84,6 @@ bcm2835_firmware_attach(device_t dev)
int rv;
sc = device_get_softc(dev);
- sc->sc_dev = dev;
node = ofw_bus_get_node(dev);
rv = OF_getencprop(node, "mboxes", &mbox, sizeof(mbox));
@@ -94,14 +95,17 @@ bcm2835_firmware_attach(device_t dev)
OF_device_register_xref(OF_xref_from_node(node), dev);
- ctx = device_get_sysctl_ctx(sc->sc_dev);
- tree_node = device_get_sysctl_tree(sc->sc_dev);
+ ctx = device_get_sysctl_ctx(dev);
+ tree_node = device_get_sysctl_tree(dev);
tree = SYSCTL_CHILDREN(tree_node);
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "revision",
CTLTYPE_UINT | CTLFLAG_RD, sc, sizeof(*sc),
sysctl_bcm2835_firmware_get_revision, "IU",
"Firmware revision");
- return (0);
+
+ /* The firmwaare doesn't have a ranges property */
+ sc->sc.flags |= SB_FLAG_NO_RANGES;
+ return (simplebus_attach(dev));
}
int
@@ -150,7 +154,7 @@ sysctl_bcm2835_firmware_get_revision(SYSCTL_HANDLER_ARGS)
uint32_t rev;
int err;
- if (bcm2835_firmware_property(sc->sc_dev,
+ if (bcm2835_firmware_property(sc->sc.dev,
BCM2835_MBOX_TAG_FIRMWARE_REVISION, &rev, sizeof(rev)) != 0)
return (ENXIO);
@@ -171,11 +175,9 @@ static device_method_t bcm2835_firmware_methods[] = {
};
static devclass_t bcm2835_firmware_devclass;
-static driver_t bcm2835_firmware_driver = {
- "bcm2835_firmware",
- bcm2835_firmware_methods,
- sizeof(struct bcm2835_firmware_softc),
-};
+DEFINE_CLASS_1(bcm2835_firmware, bcm2835_firmware_driver,
+ bcm2835_firmware_methods, sizeof(struct bcm2835_firmware_softc),
+ simplebus_driver);
EARLY_DRIVER_MODULE(bcm2835_firmware, simplebus, bcm2835_firmware_driver,
bcm2835_firmware_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LAST);
From ca9a39acb38fc0ff328995a1c3c12c78c68f442d Mon Sep 17 00:00:00 2001
From: Konstantin Belousov
Date: Mon, 3 Aug 2020 17:17:17 +0000
Subject: [PATCH 028/141] Provide more correct description for sysctl
kern.smp.cores.
Reported by: dewayne@heuristicsystems.com.au
PR: 248454
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
---
sys/kern/subr_smp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index 2024997cd1fa..411b2280b30b 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -104,7 +104,7 @@ SYSCTL_INT(_kern_smp, OID_AUTO, threads_per_core, CTLFLAG_RD|CTLFLAG_CAPRD,
int mp_ncores = -1; /* how many physical cores running */
SYSCTL_INT(_kern_smp, OID_AUTO, cores, CTLFLAG_RD|CTLFLAG_CAPRD, &mp_ncores, 0,
- "Number of CPUs online");
+ "Number of physical cores online");
int smp_topology = 0; /* Which topology we're using. */
SYSCTL_INT(_kern_smp, OID_AUTO, topology, CTLFLAG_RDTUN, &smp_topology, 0,
From 9ca3eaf0bdc12f0609580207aa1afbe51d99f080 Mon Sep 17 00:00:00 2001
From: Andrew Turner
Date: Mon, 3 Aug 2020 17:18:12 +0000
Subject: [PATCH 029/141] Add a GPIO driver for the Raspberry Pi firmware GPIOs
These exist on the Raspberry Pi 3 and 4 and control and external IO
expander.
Reviewed by: manu
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D25858
---
sys/arm/broadcom/bcm2835/raspberrypi_gpio.c | 457 ++++++++++++++++++++
sys/conf/files.arm64 | 1 +
2 files changed, 458 insertions(+)
create mode 100644 sys/arm/broadcom/bcm2835/raspberrypi_gpio.c
diff --git a/sys/arm/broadcom/bcm2835/raspberrypi_gpio.c b/sys/arm/broadcom/bcm2835/raspberrypi_gpio.c
new file mode 100644
index 000000000000..d79d39ff1497
--- /dev/null
+++ b/sys/arm/broadcom/bcm2835/raspberrypi_gpio.c
@@ -0,0 +1,457 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 2012 Oleksandr Tymoshenko
+ * Copyright (c) 2012-2015 Luiz Otavio O Souza
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+#include
+__FBSDID("$FreeBSD$");
+
+#include "opt_platform.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+#include
+
+#include "gpio_if.h"
+
+#define RPI_FW_GPIO_PINS 8
+#define RPI_FW_GPIO_BASE 128
+#define RPI_FW_GPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)
+
+struct rpi_fw_gpio_softc {
+ device_t sc_busdev;
+ device_t sc_firmware;
+ struct sx sc_sx;
+ struct gpio_pin sc_gpio_pins[RPI_FW_GPIO_PINS];
+ uint8_t sc_gpio_state;
+};
+
+#define RPI_FW_GPIO_LOCK(_sc) sx_xlock(&(_sc)->sc_sx)
+#define RPI_FW_GPIO_UNLOCK(_sc) sx_xunlock(&(_sc)->sc_sx)
+
+static struct ofw_compat_data compat_data[] = {
+ {"raspberrypi,firmware-gpio", 1},
+ {NULL, 0}
+};
+
+static int
+rpi_fw_gpio_pin_configure(struct rpi_fw_gpio_softc *sc, struct gpio_pin *pin,
+ unsigned int flags)
+{
+ union msg_get_gpio_config old_cfg;
+ union msg_set_gpio_config new_cfg;
+ int rv;
+
+ bzero(&old_cfg, sizeof(old_cfg));
+ bzero(&new_cfg, sizeof(new_cfg));
+ old_cfg.req.gpio = RPI_FW_GPIO_BASE + pin->gp_pin;
+
+ RPI_FW_GPIO_LOCK(sc);
+ rv = bcm2835_firmware_property(sc->sc_firmware,
+ BCM2835_FIRMWARE_TAG_GET_GPIO_CONFIG, &old_cfg, sizeof(old_cfg));
+ if (rv == 0 && old_cfg.resp.gpio != 0)
+ rv = EIO;
+ if (rv != 0)
+ goto fail;
+
+ new_cfg.req.gpio = RPI_FW_GPIO_BASE + pin->gp_pin;
+ if (flags & GPIO_PIN_INPUT) {
+ new_cfg.req.dir = BCM2835_FIRMWARE_GPIO_IN;
+ new_cfg.req.state = 0;
+ pin->gp_flags = GPIO_PIN_INPUT;
+ } else if (flags & GPIO_PIN_OUTPUT) {
+ new_cfg.req.dir = BCM2835_FIRMWARE_GPIO_OUT;
+ if (flags & (GPIO_PIN_PRESET_HIGH | GPIO_PIN_PRESET_LOW)) {
+ if (flags & GPIO_PIN_PRESET_HIGH) {
+ new_cfg.req.state = 1;
+ sc->sc_gpio_state |= (1 << pin->gp_pin);
+ } else {
+ new_cfg.req.state = 0;
+ sc->sc_gpio_state &= ~(1 << pin->gp_pin);
+ }
+ } else {
+ if ((sc->sc_gpio_state & (1 << pin->gp_pin)) != 0) {
+ new_cfg.req.state = 1;
+ } else {
+ new_cfg.req.state = 0;
+ }
+ }
+ pin->gp_flags = GPIO_PIN_OUTPUT;
+ } else {
+ new_cfg.req.dir = old_cfg.resp.dir;
+ /* Use the old state to decide high/low */
+ if ((sc->sc_gpio_state & (1 << pin->gp_pin)) != 0)
+ new_cfg.req.state = 1;
+ else
+ new_cfg.req.state = 0;
+ }
+ new_cfg.req.pol = old_cfg.resp.pol;
+ new_cfg.req.term_en = 0;
+ new_cfg.req.term_pull_up = 0;
+
+ rv = bcm2835_firmware_property(sc->sc_firmware,
+ BCM2835_FIRMWARE_TAG_SET_GPIO_CONFIG, &new_cfg, sizeof(new_cfg));
+
+fail:
+ RPI_FW_GPIO_UNLOCK(sc);
+
+ return (rv);
+}
+
+static device_t
+rpi_fw_gpio_get_bus(device_t dev)
+{
+ struct rpi_fw_gpio_softc *sc;
+
+ sc = device_get_softc(dev);
+
+ return (sc->sc_busdev);
+}
+
+static int
+rpi_fw_gpio_pin_max(device_t dev, int *maxpin)
+{
+
+ *maxpin = RPI_FW_GPIO_PINS - 1;
+ return (0);
+}
+
+static int
+rpi_fw_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps)
+{
+ struct rpi_fw_gpio_softc *sc;
+ int i;
+
+ sc = device_get_softc(dev);
+ for (i = 0; i < RPI_FW_GPIO_PINS; i++) {
+ if (sc->sc_gpio_pins[i].gp_pin == pin)
+ break;
+ }
+
+ if (i >= RPI_FW_GPIO_PINS)
+ return (EINVAL);
+
+ *caps = RPI_FW_GPIO_DEFAULT_CAPS;
+ return (0);
+}
+
+static int
+rpi_fw_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags)
+{
+ struct rpi_fw_gpio_softc *sc = device_get_softc(dev);
+ int i;
+
+ for (i = 0; i < RPI_FW_GPIO_PINS; i++) {
+ if (sc->sc_gpio_pins[i].gp_pin == pin)
+ break;
+ }
+
+ if (i >= RPI_FW_GPIO_PINS)
+ return (EINVAL);
+
+ RPI_FW_GPIO_LOCK(sc);
+ *flags = sc->sc_gpio_pins[i].gp_flags;
+ RPI_FW_GPIO_UNLOCK(sc);
+
+ return (0);
+}
+
+static int
+rpi_fw_gpio_pin_getname(device_t dev, uint32_t pin, char *name)
+{
+ struct rpi_fw_gpio_softc *sc;
+ int i;
+
+ sc = device_get_softc(dev);
+ for (i = 0; i < RPI_FW_GPIO_PINS; i++) {
+ if (sc->sc_gpio_pins[i].gp_pin == pin)
+ break;
+ }
+
+ if (i >= RPI_FW_GPIO_PINS)
+ return (EINVAL);
+
+ RPI_FW_GPIO_LOCK(sc);
+ memcpy(name, sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME);
+ RPI_FW_GPIO_UNLOCK(sc);
+
+ return (0);
+}
+
+static int
+rpi_fw_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags)
+{
+ struct rpi_fw_gpio_softc *sc;
+ int i;
+
+ sc = device_get_softc(dev);
+ for (i = 0; i < RPI_FW_GPIO_PINS; i++) {
+ if (sc->sc_gpio_pins[i].gp_pin == pin)
+ break;
+ }
+
+ if (i >= RPI_FW_GPIO_PINS)
+ return (EINVAL);
+
+ return (rpi_fw_gpio_pin_configure(sc, &sc->sc_gpio_pins[i], flags));
+}
+
+static int
+rpi_fw_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value)
+{
+ struct rpi_fw_gpio_softc *sc;
+ union msg_set_gpio_state state;
+ int i, rv;
+
+ sc = device_get_softc(dev);
+ for (i = 0; i < RPI_FW_GPIO_PINS; i++) {
+ if (sc->sc_gpio_pins[i].gp_pin == pin)
+ break;
+ }
+ if (i >= RPI_FW_GPIO_PINS)
+ return (EINVAL);
+
+ state.req.gpio = RPI_FW_GPIO_BASE + pin;
+ state.req.state = value;
+
+ RPI_FW_GPIO_LOCK(sc);
+ rv = bcm2835_firmware_property(sc->sc_firmware,
+ BCM2835_FIRMWARE_TAG_SET_GPIO_STATE, &state, sizeof(state));
+ /* The firmware sets gpio to 0 on success */
+ if (rv == 0 && state.resp.gpio != 0)
+ rv = EINVAL;
+ if (rv == 0) {
+ sc->sc_gpio_pins[i].gp_flags &= ~(GPIO_PIN_PRESET_HIGH |
+ GPIO_PIN_PRESET_LOW);
+ if (value)
+ sc->sc_gpio_state |= (1 << i);
+ else
+ sc->sc_gpio_state &= ~(1 << i);
+ }
+ RPI_FW_GPIO_UNLOCK(sc);
+
+ return (rv);
+}
+
+static int
+rpi_fw_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val)
+{
+ struct rpi_fw_gpio_softc *sc;
+ union msg_get_gpio_state state;
+ int i, rv;
+
+ sc = device_get_softc(dev);
+ for (i = 0; i < RPI_FW_GPIO_PINS; i++) {
+ if (sc->sc_gpio_pins[i].gp_pin == pin)
+ break;
+ }
+ if (i >= RPI_FW_GPIO_PINS)
+ return (EINVAL);
+
+ bzero(&state, sizeof(state));
+ state.req.gpio = RPI_FW_GPIO_BASE + pin;
+
+ RPI_FW_GPIO_LOCK(sc);
+ rv = bcm2835_firmware_property(sc->sc_firmware,
+ BCM2835_FIRMWARE_TAG_GET_GPIO_STATE, &state, sizeof(state));
+ RPI_FW_GPIO_UNLOCK(sc);
+
+ /* The firmware sets gpio to 0 on success */
+ if (rv == 0 && state.resp.gpio != 0)
+ rv = EINVAL;
+ if (rv == 0)
+ *val = !state.resp.state;
+
+ return (rv);
+}
+
+static int
+rpi_fw_gpio_pin_toggle(device_t dev, uint32_t pin)
+{
+ struct rpi_fw_gpio_softc *sc;
+ union msg_get_gpio_state old_state;
+ union msg_set_gpio_state new_state;
+ int i, rv;
+
+ sc = device_get_softc(dev);
+ for (i = 0; i < RPI_FW_GPIO_PINS; i++) {
+ if (sc->sc_gpio_pins[i].gp_pin == pin)
+ break;
+ }
+ if (i >= RPI_FW_GPIO_PINS)
+ return (EINVAL);
+
+ bzero(&old_state, sizeof(old_state));
+ bzero(&new_state, sizeof(new_state));
+
+ old_state.req.gpio = RPI_FW_GPIO_BASE + pin;
+ new_state.req.gpio = RPI_FW_GPIO_BASE + pin;
+
+ RPI_FW_GPIO_LOCK(sc);
+ rv = bcm2835_firmware_property(sc->sc_firmware,
+ BCM2835_FIRMWARE_TAG_GET_GPIO_STATE, &old_state, sizeof(old_state));
+ /* The firmware sets gpio to 0 on success */
+ if (rv == 0 && old_state.resp.gpio == 0) {
+ /* Set the new state to invert the GPIO */
+ new_state.req.state = !old_state.resp.state;
+ rv = bcm2835_firmware_property(sc->sc_firmware,
+ BCM2835_FIRMWARE_TAG_SET_GPIO_STATE, &new_state,
+ sizeof(new_state));
+ }
+ if (rv == 0 && (old_state.resp.gpio != 0 || new_state.resp.gpio != 0))
+ rv = EINVAL;
+ RPI_FW_GPIO_UNLOCK(sc);
+
+ return (rv);
+}
+
+static int
+rpi_fw_gpio_probe(device_t dev)
+{
+
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
+ if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0)
+ return (ENXIO);
+
+ device_set_desc(dev, "Raspberry Pi Firmware GPIO controller");
+ return (BUS_PROBE_DEFAULT);
+}
+
+static int
+rpi_fw_gpio_attach(device_t dev)
+{
+ union msg_get_gpio_config cfg;
+ struct rpi_fw_gpio_softc *sc;
+ char *names;
+ phandle_t gpio;
+ int i, nelems, elm_pos, rv;
+
+ sc = device_get_softc(dev);
+ sc->sc_firmware = device_get_parent(dev);
+ sx_init(&sc->sc_sx, "Raspberry Pi firmware gpio");
+ /* Find our node. */
+ gpio = ofw_bus_get_node(dev);
+ if (!OF_hasprop(gpio, "gpio-controller"))
+ /* This is not a GPIO controller. */
+ goto fail;
+
+ nelems = OF_getprop_alloc(gpio, "gpio-line-names", (void **)&names);
+ if (nelems <= 0)
+ names = NULL;
+ elm_pos = 0;
+ for (i = 0; i < RPI_FW_GPIO_PINS; i++) {
+ /* Set the current pin name */
+ if (names != NULL && elm_pos < nelems &&
+ names[elm_pos] != '\0') {
+ snprintf(sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME,
+ "%s", names + elm_pos);
+ /* Find the next pin name */
+ elm_pos += strlen(names + elm_pos) + 1;
+ } else {
+ snprintf(sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME,
+ "pin %d", i);
+ }
+
+ sc->sc_gpio_pins[i].gp_pin = i;
+ sc->sc_gpio_pins[i].gp_caps = RPI_FW_GPIO_DEFAULT_CAPS;
+
+ bzero(&cfg, sizeof(cfg));
+ cfg.req.gpio = RPI_FW_GPIO_BASE + i;
+ rv = bcm2835_firmware_property(sc->sc_firmware,
+ BCM2835_FIRMWARE_TAG_GET_GPIO_CONFIG, &cfg, sizeof(cfg));
+ if (rv == 0 && cfg.resp.gpio == 0) {
+ if (cfg.resp.dir == BCM2835_FIRMWARE_GPIO_IN)
+ sc->sc_gpio_pins[i].gp_flags = GPIO_PIN_INPUT;
+ else
+ sc->sc_gpio_pins[i].gp_flags = GPIO_PIN_OUTPUT;
+ } else {
+ sc->sc_gpio_pins[i].gp_flags = GPIO_PIN_INPUT;
+ }
+ }
+ free(names, M_OFWPROP);
+ sc->sc_busdev = gpiobus_attach_bus(dev);
+ if (sc->sc_busdev == NULL)
+ goto fail;
+
+ return (0);
+
+fail:
+ sx_destroy(&sc->sc_sx);
+
+ return (ENXIO);
+}
+
+static int
+rpi_fw_gpio_detach(device_t dev)
+{
+
+ return (EBUSY);
+}
+
+static device_method_t rpi_fw_gpio_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, rpi_fw_gpio_probe),
+ DEVMETHOD(device_attach, rpi_fw_gpio_attach),
+ DEVMETHOD(device_detach, rpi_fw_gpio_detach),
+
+ /* GPIO protocol */
+ DEVMETHOD(gpio_get_bus, rpi_fw_gpio_get_bus),
+ DEVMETHOD(gpio_pin_max, rpi_fw_gpio_pin_max),
+ DEVMETHOD(gpio_pin_getname, rpi_fw_gpio_pin_getname),
+ DEVMETHOD(gpio_pin_getflags, rpi_fw_gpio_pin_getflags),
+ DEVMETHOD(gpio_pin_getcaps, rpi_fw_gpio_pin_getcaps),
+ DEVMETHOD(gpio_pin_setflags, rpi_fw_gpio_pin_setflags),
+ DEVMETHOD(gpio_pin_get, rpi_fw_gpio_pin_get),
+ DEVMETHOD(gpio_pin_set, rpi_fw_gpio_pin_set),
+ DEVMETHOD(gpio_pin_toggle, rpi_fw_gpio_pin_toggle),
+
+ DEVMETHOD_END
+};
+
+static devclass_t rpi_fw_gpio_devclass;
+
+static driver_t rpi_fw_gpio_driver = {
+ "gpio",
+ rpi_fw_gpio_methods,
+ sizeof(struct rpi_fw_gpio_softc),
+};
+
+EARLY_DRIVER_MODULE(rpi_fw_gpio, bcm2835_firmware, rpi_fw_gpio_driver,
+ rpi_fw_gpio_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE);
diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64
index e8a0cfc95f0d..7bae8741eec6 100644
--- a/sys/conf/files.arm64
+++ b/sys/conf/files.arm64
@@ -108,6 +108,7 @@ arm/broadcom/bcm2835/bcm2836.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm283
arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt soc_brcm_bcm2837 | dwcotg fdt soc_brcm_bcm2838
arm/broadcom/bcm2835/bcm2838_pci.c optional soc_brcm_bcm2838 fdt pci
arm/broadcom/bcm2835/bcm2838_xhci.c optional soc_brcm_bcm2838 fdt pci xhci
+arm/broadcom/bcm2835/raspberrypi_gpio.c optional soc_brcm_bcm2837 gpio | soc_brcm_bcm2838 gpio
arm/freescale/vybrid/vf_i2c.c optional vf_i2c iicbus SOC_NXP_LS
arm/mv/a37x0_gpio.c optional a37x0_gpio gpio fdt
arm/mv/a37x0_iic.c optional a37x0_iic iicbus fdt
From 338b22234b4f300b948ea8d1292bc023976516b8 Mon Sep 17 00:00:00 2001
From: John Baldwin
Date: Mon, 3 Aug 2020 17:53:15 +0000
Subject: [PATCH 030/141] Pass the full CFLAGS to cpp for MKlib_gen.sh.
GCC's cpp was exiting immediately when it failed to find requested
includes ( and ). clang-cpp emitted an
error for the missing header files but continued processing the file
(thus not honoring any macros defined in the missing headers).
Arguably, the awk script is buggy since it doesn't check the return
value of the command it executes.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D25731
---
lib/ncurses/ncurses/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile
index 5b61df983ce9..efa38691115e 100644
--- a/lib/ncurses/ncurses/Makefile
+++ b/lib/ncurses/ncurses/Makefile
@@ -345,7 +345,7 @@ codes.c: MKcodes.awk
${AWK} -f ${NCURSES_DIR}/ncurses/tinfo/MKcodes.awk bigstrings=${USE_BIG_STRINGS} ${NCURSES_DIR}/include/Caps > codes.c
lib_gen.c: MKlib_gen.sh curses.h ncurses_dll.h
- LC_ALL=C sh ${NCURSES_DIR}/ncurses/base/MKlib_gen.sh "${CPP:N${CCACHE_BIN}} ${CPPFLAGS}" \
+ LC_ALL=C sh ${NCURSES_DIR}/ncurses/base/MKlib_gen.sh "${CPP:N${CCACHE_BIN}} ${CFLAGS}" \
"${AWK}" generated < curses.h >$@
lib_keyname.c: keys.list MKkeyname.awk
From 9053c1a4316e0168d52ec2de8a7669bf0fd5e2c1 Mon Sep 17 00:00:00 2001
From: Alex Richardson
Date: Mon, 3 Aug 2020 18:08:04 +0000
Subject: [PATCH 031/141] Allow building setmode.c on Linux/macOS
We bootstrap this file to allow compiling FreeBSD on Linux systems since
some boostrap tools use setmode(). Unfortunately, glibc's sys/stat.h
declares a non-static getumask() function (which is unimplemented!) and
that conflicts with the local getumask() function. To work around this
simply use a different name here.
Reviewed By: brooks, emaste
Differential Revision: https://reviews.freebsd.org/D25929
---
lib/libc/gen/setmode.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/libc/gen/setmode.c b/lib/libc/gen/setmode.c
index 05fe58952e9d..66976cdd7bcf 100644
--- a/lib/libc/gen/setmode.c
+++ b/lib/libc/gen/setmode.c
@@ -70,7 +70,7 @@ typedef struct bitcmd {
#define CMD2_OBITS 0x08
#define CMD2_UBITS 0x10
-static mode_t getumask(void);
+static mode_t get_current_umask(void);
static BITCMD *addcmd(BITCMD *, mode_t, mode_t, mode_t, mode_t);
static void compress_mode(BITCMD *);
#ifdef SETMODE_DEBUG
@@ -186,7 +186,7 @@ setmode(const char *p)
* Get a copy of the mask for the permissions that are mask relative.
* Flip the bits, we want what's not set.
*/
- mask = ~getumask();
+ mask = ~get_current_umask();
setlen = SET_LEN + 2;
@@ -343,13 +343,14 @@ apply: if (!*p)
}
static mode_t
-getumask(void)
+get_current_umask(void)
{
sigset_t sigset, sigoset;
size_t len;
mode_t mask;
u_short smask;
+#ifdef KERN_PROC_UMASK
/*
* First try requesting the umask without temporarily modifying it.
* Note that this does not work if the sysctl
@@ -359,7 +360,7 @@ getumask(void)
if (sysctl((int[4]){ CTL_KERN, KERN_PROC, KERN_PROC_UMASK, 0 },
4, &smask, &len, NULL, 0) == 0)
return (smask);
-
+#endif
/*
* Since it's possible that the caller is opening files inside a signal
* handler, protect them as best we can.
From c4bd82d701879af2a073472eaf8d4599047793ed Mon Sep 17 00:00:00 2001
From: Alex Richardson
Date: Mon, 3 Aug 2020 18:08:10 +0000
Subject: [PATCH 032/141] Allow bootstrapping mtree on Linux systems
Linux glibc has a dummy lchmod that always fails and emitting a linker
warning when used. Don't fail the build due to that warning when
bootstrapping by setting LD_FATAL_WARNINGS=no.
Reviewed By: brooks, emaste
Differential Revision: https://reviews.freebsd.org/D25930
---
usr.sbin/nmtree/Makefile | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/usr.sbin/nmtree/Makefile b/usr.sbin/nmtree/Makefile
index c29974ff7fcc..57705671f155 100644
--- a/usr.sbin/nmtree/Makefile
+++ b/usr.sbin/nmtree/Makefile
@@ -22,4 +22,10 @@ MLINKS= mtree.8 nmtree.8
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests
+.if defined(BOOTSTRAPPING)
+# Linux glibc has a dummy lchmod that always fails. Don't fail due to
+# the linker warning that it emits.
+LD_FATAL_WARNINGS=no
+.endif
+
.include
From a68dea2ff90f2e77fe8c6a9e022aa1ac258106b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20E=C3=9Fer?=
Date: Mon, 3 Aug 2020 18:55:39 +0000
Subject: [PATCH 033/141] Import version 3.1.4
This version makes dc exit after processing all commands passed via -e or -f
instead of waiting for more input on STDIN (add "-f -" to the command line
to emulate the behavior of versionm 3.1.3 and earlier, if desired).
The version and copyright message are no longer printed for interactive
sessions as was the case with the prior implementation in the FreeBSD base
system.
Obtained from: https://git.yzena.com/gavin/bc
---
Makefile.in | 2 +-
NEWS.md | 19 ++++++++++
README.md | 8 ++--
include/bc.h | 3 --
include/vm.h | 18 +++------
manuals/bc.1.md.in | 26 +++++--------
manuals/bc/A.1 | 35 +++++++-----------
manuals/bc/A.1.md | 26 +++++--------
manuals/bc/E.1 | 35 +++++++-----------
manuals/bc/E.1.md | 26 +++++--------
manuals/bc/EH.1 | 35 +++++++-----------
manuals/bc/EH.1.md | 26 +++++--------
manuals/bc/EHN.1 | 35 +++++++-----------
manuals/bc/EHN.1.md | 26 +++++--------
manuals/bc/EHNP.1 | 35 +++++++-----------
manuals/bc/EHNP.1.md | 26 +++++--------
manuals/bc/EHP.1 | 35 +++++++-----------
manuals/bc/EHP.1.md | 26 +++++--------
manuals/bc/EN.1 | 35 +++++++-----------
manuals/bc/EN.1.md | 26 +++++--------
manuals/bc/ENP.1 | 35 +++++++-----------
manuals/bc/ENP.1.md | 26 +++++--------
manuals/bc/EP.1 | 35 +++++++-----------
manuals/bc/EP.1.md | 26 +++++--------
manuals/bc/H.1 | 35 +++++++-----------
manuals/bc/H.1.md | 26 +++++--------
manuals/bc/HN.1 | 35 +++++++-----------
manuals/bc/HN.1.md | 26 +++++--------
manuals/bc/HNP.1 | 35 +++++++-----------
manuals/bc/HNP.1.md | 26 +++++--------
manuals/bc/HP.1 | 35 +++++++-----------
manuals/bc/HP.1.md | 26 +++++--------
manuals/bc/N.1 | 35 +++++++-----------
manuals/bc/N.1.md | 26 +++++--------
manuals/bc/NP.1 | 35 +++++++-----------
manuals/bc/NP.1.md | 26 +++++--------
manuals/bc/P.1 | 35 +++++++-----------
manuals/bc/P.1.md | 26 +++++--------
manuals/dc.1.md.in | 12 +++---
manuals/dc/A.1 | 17 +++++----
manuals/dc/A.1.md | 12 +++---
manuals/dc/E.1 | 17 +++++----
manuals/dc/E.1.md | 12 +++---
manuals/dc/EH.1 | 17 +++++----
manuals/dc/EH.1.md | 12 +++---
manuals/dc/EHN.1 | 17 +++++----
manuals/dc/EHN.1.md | 12 +++---
manuals/dc/EHNP.1 | 17 +++++----
manuals/dc/EHNP.1.md | 12 +++---
manuals/dc/EHP.1 | 17 +++++----
manuals/dc/EHP.1.md | 12 +++---
manuals/dc/EN.1 | 17 +++++----
manuals/dc/EN.1.md | 12 +++---
manuals/dc/ENP.1 | 17 +++++----
manuals/dc/ENP.1.md | 12 +++---
manuals/dc/EP.1 | 17 +++++----
manuals/dc/EP.1.md | 12 +++---
manuals/dc/H.1 | 17 +++++----
manuals/dc/H.1.md | 12 +++---
manuals/dc/HN.1 | 17 +++++----
manuals/dc/HN.1.md | 12 +++---
manuals/dc/HNP.1 | 17 +++++----
manuals/dc/HNP.1.md | 12 +++---
manuals/dc/HP.1 | 17 +++++----
manuals/dc/HP.1.md | 12 +++---
manuals/dc/N.1 | 17 +++++----
manuals/dc/N.1.md | 12 +++---
manuals/dc/NP.1 | 17 +++++----
manuals/dc/NP.1.md | 12 +++---
manuals/dc/P.1 | 17 +++++----
manuals/dc/P.1.md | 12 +++---
src/args.c | 14 +++++--
src/bc/bc.c | 2 +-
src/bc/parse.c | 18 ++++-----
src/dc/dc.c | 2 +-
src/vm.c | 74 ++++++++++++++++---------------------
tests/bc/all.txt | 2 +
tests/bc/misc6.txt | 1 +
tests/bc/misc6_results.txt | 1 +
tests/bc/misc7.txt | 1 +
tests/bc/misc7_results.txt | 1 +
tests/bc/stdin1.txt | 2 +
tests/bc/stdin1_results.txt | 1 +
tests/bc/stdin2.txt | 1 +
tests/bc/stdin2_results.txt | 3 ++
85 files changed, 737 insertions(+), 914 deletions(-)
create mode 120000 tests/bc/misc6.txt
create mode 120000 tests/bc/misc6_results.txt
create mode 120000 tests/bc/misc7.txt
create mode 120000 tests/bc/misc7_results.txt
create mode 100644 tests/bc/stdin1.txt
create mode 100644 tests/bc/stdin1_results.txt
create mode 100644 tests/bc/stdin2.txt
create mode 100644 tests/bc/stdin2_results.txt
diff --git a/Makefile.in b/Makefile.in
index 2c67e92d13de..fa087ad67aff 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -29,7 +29,7 @@
#
.POSIX:
-VERSION = 3.1.3
+VERSION = 3.1.4
SRC = %%SRC%%
OBJ = %%OBJ%%
diff --git a/NEWS.md b/NEWS.md
index 64e8deb9853d..ba528dbe907b 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,24 @@
# News
+## 3.1.4
+
+This is a production release that fixes one bug, changes two behaviors, and
+removes one environment variable.
+
+The bug is like the one in the last release except it applies if files are being
+executed. I also made the fix more general.
+
+The behavior that was changed is that `bc` now exits when given `-e`, `-f`,
+`--expression` or `--file`. However, if the last one of those is `-f-` (using
+`stdin` as the file), `bc` does not exit. If `-f-` exists and is not the last of
+the `-e` and `-f` options (and equivalents), `bc` gives a fatal error and exits.
+
+Next, I removed the `BC_EXPR_EXIT` and `DC_EXPR_EXIT` environment variables
+since their use is not needed with the behavior change.
+
+Finally, I made it so `bc` does not print the header, though the `-q` and
+`--quiet` options were kept for compatibility with GNU `bc`.
+
## 3.1.3
This is a production release that fixes one minor bug: if `bc` was invoked like
diff --git a/README.md b/README.md
index f2165e554221..8aacb21b004c 100644
--- a/README.md
+++ b/README.md
@@ -262,8 +262,8 @@ Other projects based on this bc are:
toybox `bc` should be reported there.
* [FreeBSD `bc`][23]. While the `bc` in FreeBSD is kept up-to-date, it is better
- to report bugs there, and the maintainers of the package will contact me if
- necessary.
+ to [report bugs there][24], as well as [submit patches][25], and the
+ maintainers of the package will contact me if necessary.
## Language
@@ -332,4 +332,6 @@ Folders:
[20]: https://git.yzena.com/gavin/bc
[21]: https://gavinhoward.com/2020/04/i-am-moving-away-from-github/
[22]: https://www.deepl.com/translator
-[23]: https://github.com/freebsd/freebsd/tree/master/contrib/bc
+[23]: https://svnweb.freebsd.org/base/head/contrib/bc/
+[24]: https://bugs.freebsd.org/
+[25]: https://reviews.freebsd.org/
diff --git a/include/bc.h b/include/bc.h
index ade18c828c28..4423525bad3e 100644
--- a/include/bc.h
+++ b/include/bc.h
@@ -159,9 +159,6 @@ void bc_parse_expr(BcParse *p, uint8_t flags);
void bc_parse_parse(BcParse *p);
void bc_parse_expr_status(BcParse *p, uint8_t flags, BcParseNext next);
-// This is necessary to clear up for if statements at the end of files.
-void bc_parse_noElse(BcParse *p);
-
extern const char bc_sig_msg[];
extern const uchar bc_sig_msg_len;
diff --git a/include/vm.h b/include/vm.h
index cdadfc8bed13..f178c0390853 100644
--- a/include/vm.h
+++ b/include/vm.h
@@ -102,11 +102,10 @@
#define BC_FLAG_G (UINTMAX_C(1)<<4)
#endif // BC_ENABLED
-#define BC_FLAG_Q (UINTMAX_C(1)<<5)
-#define BC_FLAG_I (UINTMAX_C(1)<<6)
-#define BC_FLAG_P (UINTMAX_C(1)<<7)
-#define BC_FLAG_TTYIN (UINTMAX_C(1)<<8)
-#define BC_FLAG_TTY (UINTMAX_C(1)<<9)
+#define BC_FLAG_I (UINTMAX_C(1)<<5)
+#define BC_FLAG_P (UINTMAX_C(1)<<6)
+#define BC_FLAG_TTYIN (UINTMAX_C(1)<<7)
+#define BC_FLAG_TTY (UINTMAX_C(1)<<8)
#define BC_TTYIN (vm.flags & BC_FLAG_TTYIN)
#define BC_TTY (vm.flags & BC_FLAG_TTY)
@@ -279,12 +278,6 @@
#define BC_VM_INVALID_CATALOG ((nl_catd) -1)
-// dc does not use is_stdin.
-#if !BC_ENABLED
-#define bc_vm_process(text, is_stdin) bc_vm_process(text)
-#else // BC_ENABLED
-#endif // BC_ENABLED
-
typedef struct BcVm {
volatile sig_atomic_t status;
@@ -310,6 +303,7 @@ typedef struct BcVm {
uint16_t nchars;
uint16_t line_len;
+ bool no_exit_exprs;
bool eof;
BcBigDig maxes[BC_PROG_GLOBALS_LEN + BC_ENABLE_EXTRA_MATH];
@@ -360,7 +354,7 @@ typedef struct BcVm {
void bc_vm_info(const char* const help);
void bc_vm_boot(int argc, char *argv[], const char *env_len,
- const char* const env_args, const char* env_exp_quit);
+ const char* const env_args);
void bc_vm_shutdown(void);
void bc_vm_printf(const char *fmt, ...);
diff --git a/manuals/bc.1.md.in b/manuals/bc.1.md.in
index ed2fa8beae7b..80892e742345 100644
--- a/manuals/bc.1.md.in
+++ b/manuals/bc.1.md.in
@@ -195,10 +195,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -229,9 +229,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -241,9 +242,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -1615,12 +1615,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/A.1 b/manuals/bc/A.1
index 6421238febb6..f0966ba9d877 100644
--- a/manuals/bc/A.1
+++ b/manuals/bc/A.1
@@ -187,13 +187,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -231,10 +231,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -246,10 +248,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1915,14 +1916,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/A.1.md b/manuals/bc/A.1.md
index 31b491a3bc70..e67c20656e23 100644
--- a/manuals/bc/A.1.md
+++ b/manuals/bc/A.1.md
@@ -153,10 +153,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -187,9 +187,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -199,9 +200,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -1524,12 +1524,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/E.1 b/manuals/bc/E.1
index 70afc2b716f4..d85db650606c 100644
--- a/manuals/bc/E.1
+++ b/manuals/bc/E.1
@@ -148,13 +148,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -192,10 +192,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -207,10 +209,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1161,14 +1162,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/E.1.md b/manuals/bc/E.1.md
index 4b5b95ab4d27..ab432274fa52 100644
--- a/manuals/bc/E.1.md
+++ b/manuals/bc/E.1.md
@@ -137,10 +137,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -171,9 +171,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -183,9 +184,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -920,12 +920,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/EH.1 b/manuals/bc/EH.1
index 90708661143a..c9b196f7452a 100644
--- a/manuals/bc/EH.1
+++ b/manuals/bc/EH.1
@@ -145,13 +145,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -189,10 +189,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -204,10 +206,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1158,14 +1159,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/EH.1.md b/manuals/bc/EH.1.md
index 60efac2dd904..32ef6e0d009f 100644
--- a/manuals/bc/EH.1.md
+++ b/manuals/bc/EH.1.md
@@ -134,10 +134,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -168,9 +168,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -180,9 +181,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -917,12 +917,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/EHN.1 b/manuals/bc/EHN.1
index 203cc531e8b7..0117a4cd0b68 100644
--- a/manuals/bc/EHN.1
+++ b/manuals/bc/EHN.1
@@ -145,13 +145,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -189,10 +189,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -204,10 +206,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1158,14 +1159,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/EHN.1.md b/manuals/bc/EHN.1.md
index 6264e7bf5c81..38b7cf78d76a 100644
--- a/manuals/bc/EHN.1.md
+++ b/manuals/bc/EHN.1.md
@@ -134,10 +134,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -168,9 +168,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -180,9 +181,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -917,12 +917,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/EHNP.1 b/manuals/bc/EHNP.1
index da6a25888ce0..02b96492075d 100644
--- a/manuals/bc/EHNP.1
+++ b/manuals/bc/EHNP.1
@@ -140,13 +140,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -184,10 +184,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -199,10 +201,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1153,14 +1154,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/EHNP.1.md b/manuals/bc/EHNP.1.md
index 917b7bc6665c..df608db015b4 100644
--- a/manuals/bc/EHNP.1.md
+++ b/manuals/bc/EHNP.1.md
@@ -130,10 +130,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -164,9 +164,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -176,9 +177,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -913,12 +913,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/EHP.1 b/manuals/bc/EHP.1
index 3352c2ee5610..cc2920f84403 100644
--- a/manuals/bc/EHP.1
+++ b/manuals/bc/EHP.1
@@ -140,13 +140,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -184,10 +184,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -199,10 +201,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1153,14 +1154,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/EHP.1.md b/manuals/bc/EHP.1.md
index 30e411236e46..0ce1f5209c21 100644
--- a/manuals/bc/EHP.1.md
+++ b/manuals/bc/EHP.1.md
@@ -130,10 +130,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -164,9 +164,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -176,9 +177,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -913,12 +913,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/EN.1 b/manuals/bc/EN.1
index a662d40fdda9..d7f967d96cd5 100644
--- a/manuals/bc/EN.1
+++ b/manuals/bc/EN.1
@@ -148,13 +148,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -192,10 +192,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -207,10 +209,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1161,14 +1162,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/EN.1.md b/manuals/bc/EN.1.md
index cefe8630da75..55ca344ddeb2 100644
--- a/manuals/bc/EN.1.md
+++ b/manuals/bc/EN.1.md
@@ -137,10 +137,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -171,9 +171,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -183,9 +184,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -920,12 +920,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/ENP.1 b/manuals/bc/ENP.1
index b98a2a2ce2fe..736e26bd9acd 100644
--- a/manuals/bc/ENP.1
+++ b/manuals/bc/ENP.1
@@ -143,13 +143,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -187,10 +187,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -202,10 +204,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1156,14 +1157,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/ENP.1.md b/manuals/bc/ENP.1.md
index 6d7194f31cf6..1eae3dee00d1 100644
--- a/manuals/bc/ENP.1.md
+++ b/manuals/bc/ENP.1.md
@@ -133,10 +133,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -167,9 +167,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -179,9 +180,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -916,12 +916,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/EP.1 b/manuals/bc/EP.1
index 9c841d8bab4b..107342a54361 100644
--- a/manuals/bc/EP.1
+++ b/manuals/bc/EP.1
@@ -143,13 +143,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -187,10 +187,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -202,10 +204,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1156,14 +1157,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/EP.1.md b/manuals/bc/EP.1.md
index 090b07f0a2d0..7e3d6aca7384 100644
--- a/manuals/bc/EP.1.md
+++ b/manuals/bc/EP.1.md
@@ -133,10 +133,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -167,9 +167,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -179,9 +180,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -916,12 +916,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/H.1 b/manuals/bc/H.1
index 17a913896886..48ccfb55b962 100644
--- a/manuals/bc/H.1
+++ b/manuals/bc/H.1
@@ -182,13 +182,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -226,10 +226,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -241,10 +243,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1910,14 +1911,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/H.1.md b/manuals/bc/H.1.md
index 089953f9706a..413032534554 100644
--- a/manuals/bc/H.1.md
+++ b/manuals/bc/H.1.md
@@ -149,10 +149,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -183,9 +183,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -195,9 +196,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -1520,12 +1520,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/HN.1 b/manuals/bc/HN.1
index f275ceaffb9b..9126c9209da5 100644
--- a/manuals/bc/HN.1
+++ b/manuals/bc/HN.1
@@ -182,13 +182,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -226,10 +226,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -241,10 +243,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1910,14 +1911,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/HN.1.md b/manuals/bc/HN.1.md
index 2e1935a12539..c9ac146efbb2 100644
--- a/manuals/bc/HN.1.md
+++ b/manuals/bc/HN.1.md
@@ -149,10 +149,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -183,9 +183,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -195,9 +196,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -1520,12 +1520,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/HNP.1 b/manuals/bc/HNP.1
index e3583a545c74..ad09513f0528 100644
--- a/manuals/bc/HNP.1
+++ b/manuals/bc/HNP.1
@@ -177,13 +177,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -221,10 +221,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -236,10 +238,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1905,14 +1906,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/HNP.1.md b/manuals/bc/HNP.1.md
index 7501316421d6..dc8c70ac09a9 100644
--- a/manuals/bc/HNP.1.md
+++ b/manuals/bc/HNP.1.md
@@ -145,10 +145,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -179,9 +179,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -191,9 +192,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -1516,12 +1516,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/HP.1 b/manuals/bc/HP.1
index 9c7d0abab262..3ede3a2d5ca8 100644
--- a/manuals/bc/HP.1
+++ b/manuals/bc/HP.1
@@ -177,13 +177,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -221,10 +221,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -236,10 +238,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1905,14 +1906,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/HP.1.md b/manuals/bc/HP.1.md
index cafab919d324..2c4053a302d0 100644
--- a/manuals/bc/HP.1.md
+++ b/manuals/bc/HP.1.md
@@ -145,10 +145,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -179,9 +179,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -191,9 +192,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -1516,12 +1516,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/N.1 b/manuals/bc/N.1
index 83049e7c7b14..5c3e86157ba7 100644
--- a/manuals/bc/N.1
+++ b/manuals/bc/N.1
@@ -187,13 +187,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -231,10 +231,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -246,10 +248,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1915,14 +1916,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/N.1.md b/manuals/bc/N.1.md
index 49aaf0fbbcfd..9eabb2591eab 100644
--- a/manuals/bc/N.1.md
+++ b/manuals/bc/N.1.md
@@ -153,10 +153,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -187,9 +187,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -199,9 +200,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -1524,12 +1524,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/NP.1 b/manuals/bc/NP.1
index a50dfe2dcc17..8c2a2994a17f 100644
--- a/manuals/bc/NP.1
+++ b/manuals/bc/NP.1
@@ -182,13 +182,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -226,10 +226,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -241,10 +243,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1910,14 +1911,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/NP.1.md b/manuals/bc/NP.1.md
index a5aa258659d2..be11fe236209 100644
--- a/manuals/bc/NP.1.md
+++ b/manuals/bc/NP.1.md
@@ -149,10 +149,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -183,9 +183,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -195,9 +196,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -1520,12 +1520,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/P.1 b/manuals/bc/P.1
index 4f6b4ece227c..db807e440c28 100644
--- a/manuals/bc/P.1
+++ b/manuals/bc/P.1
@@ -182,13 +182,13 @@ This is a \f[B]non\-portable extension\f[].
.RE
.TP
.B \f[B]\-q\f[], \f[B]\-\-quiet\f[]
-Do not print copyright header.
-bc(1) will also suppress the header in non\-interactive mode.
+This option is for compatibility with the GNU
+bc(1) (https://www.gnu.org/software/bc/); it is a no\-op.
+Without this option, GNU bc(1) prints a copyright header.
+This bc(1) only prints the copyright header if one or more of the
+\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given.
.RS
.PP
-This is mostly for compatibility with the GNU
-bc(1) (https://www.gnu.org/software/bc/).
-.PP
This is a \f[B]non\-portable extension\f[].
.RE
.TP
@@ -226,10 +226,12 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -241,10 +243,9 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other bc(1) implementations, this option causes the program to
-execute the files and then exit.
-This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, bc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -1910,14 +1911,6 @@ the backslash (\f[B]\\\f[]).
The default line length is \f[B]70\f[].
.RS
.RE
-.TP
-.B \f[B]BC_EXPR_EXIT\f[]
-If this variable exists (no matter the contents), bc(1) will exit
-immediately after executing expressions and files given by the
-\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
-equivalents).
-.RS
-.RE
.SH EXIT STATUS
.PP
bc(1) returns the following exit statuses:
diff --git a/manuals/bc/P.1.md b/manuals/bc/P.1.md
index 1f7379ebfe41..1058a91aa6d2 100644
--- a/manuals/bc/P.1.md
+++ b/manuals/bc/P.1.md
@@ -149,10 +149,10 @@ The following are the options that bc(1) accepts.
**-q**, **--quiet**
-: Do not print copyright header. bc(1) will also suppress the header in
- non-interactive mode.
-
- This is mostly for compatibility with the [GNU bc(1)][2].
+: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op.
+ Without this option, GNU bc(1) prints a copyright header. This bc(1) only
+ prints the copyright header if one or more of the **-v**, **-V**, or
+ **--version** options are given.
This is a **non-portable extension**.
@@ -183,9 +183,10 @@ The following are the options that bc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other bc(1) implementations, this option causes the program to execute
- the expressions and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -195,9 +196,8 @@ The following are the options that bc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other bc(1) implementations, this option causes the program to execute
- the files and then exit. This bc(1) does not, unless the
- **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, bc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -1520,12 +1520,6 @@ bc(1) recognizes the following environment variables:
lines to that length, including the backslash (**\\**). The default line
length is **70**.
-**BC_EXPR_EXIT**
-
-: If this variable exists (no matter the contents), bc(1) will exit
- immediately after executing expressions and files given by the **-e** and/or
- **-f** command-line options (and any equivalents).
-
# EXIT STATUS
bc(1) returns the following exit statuses:
diff --git a/manuals/dc.1.md.in b/manuals/dc.1.md.in
index b6d252a2276e..abb1c4aac773 100644
--- a/manuals/dc.1.md.in
+++ b/manuals/dc.1.md.in
@@ -106,9 +106,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -118,9 +117,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/A.1 b/manuals/dc/A.1
index 10627cb197ec..001fe5a1f2c5 100644
--- a/manuals/dc/A.1
+++ b/manuals/dc/A.1
@@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/A.1.md b/manuals/dc/A.1.md
index 36b20862c57f..50c7c8f08c6b 100644
--- a/manuals/dc/A.1.md
+++ b/manuals/dc/A.1.md
@@ -101,9 +101,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -113,9 +112,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/E.1 b/manuals/dc/E.1
index 7f11a33bb18a..f5b1f194f206 100644
--- a/manuals/dc/E.1
+++ b/manuals/dc/E.1
@@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/E.1.md b/manuals/dc/E.1.md
index 028e61b42bcc..bb2ab4b0366d 100644
--- a/manuals/dc/E.1.md
+++ b/manuals/dc/E.1.md
@@ -101,9 +101,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -113,9 +112,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/EH.1 b/manuals/dc/EH.1
index d7efbd649a76..9c5cf7d14c92 100644
--- a/manuals/dc/EH.1
+++ b/manuals/dc/EH.1
@@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/EH.1.md b/manuals/dc/EH.1.md
index 774ba6e32b3a..e1a0540d1243 100644
--- a/manuals/dc/EH.1.md
+++ b/manuals/dc/EH.1.md
@@ -101,9 +101,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -113,9 +112,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/EHN.1 b/manuals/dc/EHN.1
index a77032398174..4d95b4a1ac96 100644
--- a/manuals/dc/EHN.1
+++ b/manuals/dc/EHN.1
@@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/EHN.1.md b/manuals/dc/EHN.1.md
index b4845bf77d86..1fe5ab8cac09 100644
--- a/manuals/dc/EHN.1.md
+++ b/manuals/dc/EHN.1.md
@@ -101,9 +101,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -113,9 +112,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/EHNP.1 b/manuals/dc/EHNP.1
index fb350b8ed2f9..aceea91027ad 100644
--- a/manuals/dc/EHNP.1
+++ b/manuals/dc/EHNP.1
@@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/EHNP.1.md b/manuals/dc/EHNP.1.md
index 71a24ac4e635..97585bba14bb 100644
--- a/manuals/dc/EHNP.1.md
+++ b/manuals/dc/EHNP.1.md
@@ -98,9 +98,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -110,9 +109,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/EHP.1 b/manuals/dc/EHP.1
index 2a47184695cb..70e45ae52363 100644
--- a/manuals/dc/EHP.1
+++ b/manuals/dc/EHP.1
@@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/EHP.1.md b/manuals/dc/EHP.1.md
index 5445e17e5811..d101695a1c89 100644
--- a/manuals/dc/EHP.1.md
+++ b/manuals/dc/EHP.1.md
@@ -98,9 +98,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -110,9 +109,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/EN.1 b/manuals/dc/EN.1
index cc6ec8baaefd..4c57b0dd03e3 100644
--- a/manuals/dc/EN.1
+++ b/manuals/dc/EN.1
@@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/EN.1.md b/manuals/dc/EN.1.md
index 114c4d1916b1..e1826daa4e18 100644
--- a/manuals/dc/EN.1.md
+++ b/manuals/dc/EN.1.md
@@ -101,9 +101,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -113,9 +112,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/ENP.1 b/manuals/dc/ENP.1
index 01a49aff21ae..2e8e2341a739 100644
--- a/manuals/dc/ENP.1
+++ b/manuals/dc/ENP.1
@@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/ENP.1.md b/manuals/dc/ENP.1.md
index df9c398527c8..cc5eea424fb2 100644
--- a/manuals/dc/ENP.1.md
+++ b/manuals/dc/ENP.1.md
@@ -98,9 +98,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -110,9 +109,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/EP.1 b/manuals/dc/EP.1
index 00d29fc3ff9c..f97f2a8ae98f 100644
--- a/manuals/dc/EP.1
+++ b/manuals/dc/EP.1
@@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/EP.1.md b/manuals/dc/EP.1.md
index 99bb462fb0a0..cd58549b17a5 100644
--- a/manuals/dc/EP.1.md
+++ b/manuals/dc/EP.1.md
@@ -98,9 +98,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -110,9 +109,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/H.1 b/manuals/dc/H.1
index 02825b898261..44617c0b1a3c 100644
--- a/manuals/dc/H.1
+++ b/manuals/dc/H.1
@@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/H.1.md b/manuals/dc/H.1.md
index ab3b13fbf758..327e27a0c893 100644
--- a/manuals/dc/H.1.md
+++ b/manuals/dc/H.1.md
@@ -101,9 +101,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -113,9 +112,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/HN.1 b/manuals/dc/HN.1
index cb97ca4cafb3..8b032e82f1f9 100644
--- a/manuals/dc/HN.1
+++ b/manuals/dc/HN.1
@@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/HN.1.md b/manuals/dc/HN.1.md
index a4d3b9f6ca9e..f128840138a5 100644
--- a/manuals/dc/HN.1.md
+++ b/manuals/dc/HN.1.md
@@ -101,9 +101,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -113,9 +112,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/HNP.1 b/manuals/dc/HNP.1
index fefaa2a56c9d..f5152fa781d4 100644
--- a/manuals/dc/HNP.1
+++ b/manuals/dc/HNP.1
@@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/HNP.1.md b/manuals/dc/HNP.1.md
index b97a4a118d89..fc71488f8b53 100644
--- a/manuals/dc/HNP.1.md
+++ b/manuals/dc/HNP.1.md
@@ -98,9 +98,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -110,9 +109,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/HP.1 b/manuals/dc/HP.1
index 45b0cc111be8..eeae02949fc0 100644
--- a/manuals/dc/HP.1
+++ b/manuals/dc/HP.1
@@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/HP.1.md b/manuals/dc/HP.1.md
index fb7569dab186..88e0914d6266 100644
--- a/manuals/dc/HP.1.md
+++ b/manuals/dc/HP.1.md
@@ -98,9 +98,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -110,9 +109,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/N.1 b/manuals/dc/N.1
index a4fb86637c1f..a7ca5b5fec27 100644
--- a/manuals/dc/N.1
+++ b/manuals/dc/N.1
@@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/N.1.md b/manuals/dc/N.1.md
index ac7e27b6e5a3..6e843649b37d 100644
--- a/manuals/dc/N.1.md
+++ b/manuals/dc/N.1.md
@@ -101,9 +101,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -113,9 +112,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/NP.1 b/manuals/dc/NP.1
index 9b0b407bb327..bfd1c0e59d4f 100644
--- a/manuals/dc/NP.1
+++ b/manuals/dc/NP.1
@@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/NP.1.md b/manuals/dc/NP.1.md
index f521c3df205e..b83d20a806bb 100644
--- a/manuals/dc/NP.1.md
+++ b/manuals/dc/NP.1.md
@@ -98,9 +98,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -110,9 +109,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/manuals/dc/P.1 b/manuals/dc/P.1
index 4ba6c64322d9..6f5cd4cec1d3 100644
--- a/manuals/dc/P.1
+++ b/manuals/dc/P.1
@@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the expressions and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
.PP
This is a \f[B]non\-portable extension\f[].
.RE
@@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-In other dc(1) implementations, this option causes the program to
-execute the files and then exit.
-This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
-the \f[B]ENVIRONMENT VARIABLES\f[] section).
+After processing all expressions and files, dc(1) will exit, unless
+\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to
+\f[B]\-f\f[] or \f[B]\-\-file\f[].
+However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[],
+\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1)
+will give a fatal error and exit.
.PP
This is a \f[B]non\-portable extension\f[].
.RE
diff --git a/manuals/dc/P.1.md b/manuals/dc/P.1.md
index dc6d3d950067..41aad658bb3d 100644
--- a/manuals/dc/P.1.md
+++ b/manuals/dc/P.1.md
@@ -98,9 +98,8 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- In other dc(1) implementations, this option causes the program to execute
- the expressions and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
This is a **non-portable extension**.
@@ -110,9 +109,10 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- In other dc(1) implementations, this option causes the program to execute
- the files and then exit. This dc(1) does not, unless the
- **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section).
+ After processing all expressions and files, dc(1) will exit, unless **-**
+ (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ However, if any other **-e**, **--expression**, **-f**, or **--file**
+ arguments are given after that, bc(1) will give a fatal error and exit.
This is a **non-portable extension**.
diff --git a/src/args.c b/src/args.c
index 1626ad4944e4..029237627786 100644
--- a/src/args.c
+++ b/src/args.c
@@ -108,13 +108,20 @@ void bc_args(int argc, char *argv[]) {
case 'e':
{
+ if (vm.no_exit_exprs)
+ bc_vm_verr(BC_ERROR_FATAL_OPTION, "-e (--expression)");
bc_args_exprs(opts.optarg);
break;
}
case 'f':
{
- bc_args_file(opts.optarg);
+ if (!strcmp(opts.optarg, "-")) vm.no_exit_exprs = true;
+ else {
+ if (vm.no_exit_exprs)
+ bc_vm_verr(BC_ERROR_FATAL_OPTION, "-f (--file)");
+ bc_args_file(opts.optarg);
+ }
break;
}
@@ -155,7 +162,7 @@ void bc_args(int argc, char *argv[]) {
case 'q':
{
assert(BC_IS_BC);
- vm.flags |= BC_FLAG_Q;
+ // Do nothing.
break;
}
@@ -205,9 +212,8 @@ void bc_args(int argc, char *argv[]) {
if (version) bc_vm_info(NULL);
if (do_exit) exit((int) vm.status);
- if (vm.exprs.len > 1 || BC_IS_DC) vm.flags |= BC_FLAG_Q;
- if (opts.optind < (size_t) argc)
+ if (opts.optind < (size_t) argc && vm.files.v == NULL)
bc_vec_init(&vm.files, sizeof(char*), NULL);
for (i = opts.optind; i < (size_t) argc; ++i)
diff --git a/src/bc/bc.c b/src/bc/bc.c
index ef0fc3d6865d..3d488b5640c8 100644
--- a/src/bc/bc.c
+++ b/src/bc/bc.c
@@ -52,6 +52,6 @@ void bc_main(int argc, char **argv) {
vm.parse = bc_parse_parse;
vm.expr = bc_parse_expr;
- bc_vm_boot(argc, argv, "BC_LINE_LENGTH", "BC_ENV_ARGS", "BC_EXPR_EXIT");
+ bc_vm_boot(argc, argv, "BC_LINE_LENGTH", "BC_ENV_ARGS");
}
#endif // BC_ENABLED
diff --git a/src/bc/parse.c b/src/bc/parse.c
index 2aa9d97468ff..329c1a84b419 100644
--- a/src/bc/parse.c
+++ b/src/bc/parse.c
@@ -179,10 +179,10 @@ static void bc_parse_params(BcParse *p, uint8_t flags) {
bc_lex_next(&p->l);
- for (nparams = 0; p->l.t != BC_LEX_RPAREN; ++nparams) {
+ flags &= ~(BC_PARSE_PRINT | BC_PARSE_REL);
+ flags |= (BC_PARSE_ARRAY | BC_PARSE_NEEDVAL);
- flags &= ~(BC_PARSE_PRINT | BC_PARSE_REL);
- flags |= (BC_PARSE_ARRAY | BC_PARSE_NEEDVAL);
+ for (nparams = 0; p->l.t != BC_LEX_RPAREN; ++nparams) {
bc_parse_expr_status(p, flags, bc_parse_next_param);
@@ -516,6 +516,12 @@ static void bc_parse_return(BcParse *p) {
}
}
+static void bc_parse_noElse(BcParse *p) {
+ uint16_t *flag_ptr = BC_PARSE_TOP_FLAG_PTR(p);
+ *flag_ptr = (*flag_ptr & ~(BC_PARSE_FLAG_IF_END));
+ bc_parse_setLabel(p);
+}
+
static void bc_parse_endBody(BcParse *p, bool brace) {
bool has_brace, new_else = false;
@@ -610,12 +616,6 @@ static void bc_parse_startBody(BcParse *p, uint16_t flags) {
bc_vec_push(&p->flags, &flags);
}
-void bc_parse_noElse(BcParse *p) {
- uint16_t *flag_ptr = BC_PARSE_TOP_FLAG_PTR(p);
- *flag_ptr = (*flag_ptr & ~(BC_PARSE_FLAG_IF_END));
- bc_parse_setLabel(p);
-}
-
static void bc_parse_if(BcParse *p) {
size_t idx;
diff --git a/src/dc/dc.c b/src/dc/dc.c
index 21d7bfbd4385..8c03ccf0e414 100644
--- a/src/dc/dc.c
+++ b/src/dc/dc.c
@@ -52,6 +52,6 @@ void dc_main(int argc, char **argv) {
vm.parse = dc_parse_parse;
vm.expr = dc_parse_expr;
- bc_vm_boot(argc, argv, "DC_LINE_LENGTH", "DC_ENV_ARGS", "DC_EXPR_EXIT");
+ bc_vm_boot(argc, argv, "DC_LINE_LENGTH", "DC_ENV_ARGS");
}
#endif // DC_ENABLED
diff --git a/src/vm.c b/src/vm.c
index 905613563e8d..9818ce4f35f4 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -452,7 +452,7 @@ static void bc_vm_clean(void) {
}
}
-static void bc_vm_process(const char *text, bool is_stdin) {
+static void bc_vm_process(const char *text) {
bc_parse_text(&vm.prs, text);
@@ -464,21 +464,6 @@ static void bc_vm_process(const char *text, bool is_stdin) {
while (BC_PARSE_CAN_PARSE(vm.prs)) vm.parse(&vm.prs);
-#if BC_ENABLED
- if (BC_IS_BC) {
-
- uint16_t *flags = BC_PARSE_TOP_FLAG_PTR(&vm.prs);
-
- if (!is_stdin && vm.prs.flags.len == 1 &&
- *flags == BC_PARSE_FLAG_IF_END)
- {
- bc_parse_noElse(&vm.prs);
- }
-
- if (BC_PARSE_NO_EXEC(&vm.prs)) return;
- }
-#endif // BC_ENABLED
-
bc_program_exec(&vm.prog);
assert(BC_IS_DC || vm.prog.results.len == 0);
@@ -488,6 +473,28 @@ static void bc_vm_process(const char *text, bool is_stdin) {
} while (vm.prs.l.t != BC_LEX_EOF);
}
+#if BC_ENABLED
+static void bc_vm_endif(void) {
+
+ size_t i;
+ bool good;
+
+ if (BC_NO_ERR(!BC_PARSE_NO_EXEC(&vm.prs))) return;
+
+ good = true;
+
+ for (i = 0; good && i < vm.prs.flags.len; ++i) {
+ uint16_t flag = *((uint16_t*) bc_vec_item(&vm.prs.flags, i));
+ good = ((flag & BC_PARSE_FLAG_BRACE) != BC_PARSE_FLAG_BRACE);
+ }
+
+ if (good) {
+ while (BC_PARSE_IF_END(&vm.prs)) bc_vm_process("else {}");
+ }
+ else bc_parse_err(&vm.prs, BC_ERROR_PARSE_BLOCK);
+}
+#endif // BC_ENABLED
+
static void bc_vm_file(const char *file) {
char *data = NULL;
@@ -504,11 +511,10 @@ static void bc_vm_file(const char *file) {
BC_SIG_UNLOCK;
- bc_vm_process(data, false);
+ bc_vm_process(data);
#if BC_ENABLED
- if (BC_IS_BC && BC_ERR(BC_PARSE_NO_EXEC(&vm.prs)))
- bc_parse_err(&vm.prs, BC_ERROR_PARSE_BLOCK);
+ if (BC_IS_BC) bc_vm_endif();
#endif // BC_ENABLED
err:
@@ -589,7 +595,7 @@ static void bc_vm_stdin(void) {
if (vm.history.stdin_has_data) continue;
#endif // BC_ENABLE_HISTORY
- bc_vm_process(buffer.v, true);
+ bc_vm_process(buffer.v);
bc_vec_empty(&buffer);
if (vm.eof) break;
@@ -602,21 +608,7 @@ static void bc_vm_stdin(void) {
else if (BC_ERR(string))
bc_parse_err(&vm.prs, BC_ERROR_PARSE_STRING);
#if BC_ENABLED
- else if (BC_IS_BC && BC_ERR(BC_PARSE_NO_EXEC(&vm.prs))) {
-
- size_t i;
- bool good = true;
-
- for (i = 0; good && i < vm.prs.flags.len; ++i) {
- uint16_t flag = *((uint16_t*) bc_vec_item(&vm.prs.flags, i));
- good = ((flag & BC_PARSE_FLAG_BRACE) != BC_PARSE_FLAG_BRACE);
- }
-
- if (good) {
- while (BC_PARSE_IF_END(&vm.prs)) bc_vm_process("else {}", true);
- }
- else bc_parse_err(&vm.prs, BC_ERROR_PARSE_BLOCK);
- }
+ else if (BC_IS_BC) bc_vm_endif();
#endif // BC_ENABLED
}
@@ -706,7 +698,7 @@ static void bc_vm_gettext(void) {
#endif // BC_ENABLE_NLS
}
-static void bc_vm_exec(const char* env_exp_exit) {
+static void bc_vm_exec(void) {
size_t i;
bool has_file = false;
@@ -743,7 +735,7 @@ static void bc_vm_exec(const char* env_exp_exit) {
more = bc_read_buf(&buf, vm.exprs.v, &len);
bc_vec_pushByte(&buf, '\0');
- bc_vm_process(buf.v, false);
+ bc_vm_process(buf.v);
bc_vec_npop(&buf, buf.len);
@@ -758,7 +750,7 @@ static void bc_vm_exec(const char* env_exp_exit) {
BC_SIG_UNLOCK;
- if (getenv(env_exp_exit) != NULL) return;
+ if (!vm.no_exit_exprs) return;
}
for (i = 0; i < vm.files.len; ++i) {
@@ -784,7 +776,7 @@ static void bc_vm_exec(const char* env_exp_exit) {
}
void bc_vm_boot(int argc, char *argv[], const char *env_len,
- const char* const env_args, const char* env_exp_exit)
+ const char* const env_args)
{
int ttyin, ttyout, ttyerr;
struct sigaction sa;
@@ -863,9 +855,7 @@ void bc_vm_boot(int argc, char *argv[], const char *env_len,
vm.maxes[BC_PROG_GLOBALS_IBASE] = BC_NUM_MAX_IBASE;
#endif // BC_ENABLED
- if (BC_IS_BC && BC_I && !(vm.flags & BC_FLAG_Q)) bc_vm_info(NULL);
-
BC_SIG_UNLOCK;
- bc_vm_exec(env_exp_exit);
+ bc_vm_exec();
}
diff --git a/tests/bc/all.txt b/tests/bc/all.txt
index 069e60942404..b623e8a11b71 100644
--- a/tests/bc/all.txt
+++ b/tests/bc/all.txt
@@ -39,6 +39,8 @@ misc2
misc3
misc4
misc5
+misc6
+misc7
void
rand
lib2
diff --git a/tests/bc/misc6.txt b/tests/bc/misc6.txt
new file mode 120000
index 000000000000..1ddbfa42bea4
--- /dev/null
+++ b/tests/bc/misc6.txt
@@ -0,0 +1 @@
+stdin1.txt
\ No newline at end of file
diff --git a/tests/bc/misc6_results.txt b/tests/bc/misc6_results.txt
new file mode 120000
index 000000000000..a0374545ed82
--- /dev/null
+++ b/tests/bc/misc6_results.txt
@@ -0,0 +1 @@
+stdin1_results.txt
\ No newline at end of file
diff --git a/tests/bc/misc7.txt b/tests/bc/misc7.txt
new file mode 120000
index 000000000000..17ea58ae3ffd
--- /dev/null
+++ b/tests/bc/misc7.txt
@@ -0,0 +1 @@
+stdin2.txt
\ No newline at end of file
diff --git a/tests/bc/misc7_results.txt b/tests/bc/misc7_results.txt
new file mode 120000
index 000000000000..394d3e9d57c1
--- /dev/null
+++ b/tests/bc/misc7_results.txt
@@ -0,0 +1 @@
+stdin2_results.txt
\ No newline at end of file
diff --git a/tests/bc/stdin1.txt b/tests/bc/stdin1.txt
new file mode 100644
index 000000000000..3721c265baa2
--- /dev/null
+++ b/tests/bc/stdin1.txt
@@ -0,0 +1,2 @@
+if (1 < 3)
+ if (2 < 3) 1
diff --git a/tests/bc/stdin1_results.txt b/tests/bc/stdin1_results.txt
new file mode 100644
index 000000000000..d00491fd7e5b
--- /dev/null
+++ b/tests/bc/stdin1_results.txt
@@ -0,0 +1 @@
+1
diff --git a/tests/bc/stdin2.txt b/tests/bc/stdin2.txt
new file mode 100644
index 000000000000..f260cfa7dbcf
--- /dev/null
+++ b/tests/bc/stdin2.txt
@@ -0,0 +1 @@
+for (i = 0; i < 3; ++i) if (2 < 3) 1
diff --git a/tests/bc/stdin2_results.txt b/tests/bc/stdin2_results.txt
new file mode 100644
index 000000000000..e8183f05f5db
--- /dev/null
+++ b/tests/bc/stdin2_results.txt
@@ -0,0 +1,3 @@
+1
+1
+1
From 2ead2969a0bd202c427a4c17a91376d6189b5c1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20E=C3=9Fer?=
Date: Mon, 3 Aug 2020 19:18:38 +0000
Subject: [PATCH 034/141] Upgrade to version 3.1.4
This version omits the printing of a copyright header in interactive mode
and the dc command now exits after execution of the commands passed via -e
or -f instead of switching to interactive mode. To pass further commands
via STDIN when dc has been invoked with -e or -f, add "-f -" to the
parameter list.
---
usr.bin/gh-bc/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/usr.bin/gh-bc/Makefile b/usr.bin/gh-bc/Makefile
index f630685504fb..654752e0df82 100644
--- a/usr.bin/gh-bc/Makefile
+++ b/usr.bin/gh-bc/Makefile
@@ -59,6 +59,10 @@ MAN_SRC_DC= dc/A.1
CFLAGS+= -flto
.endif
+.if ${MK_TESTS} != "no"
+#SUBDIR+= tests
+.endif
+
.for catalog in ${CATALOGS}
NLS+= ${catalog:C/.*://}
NLSSRCFILES_${catalog:C/.*://}= ${catalog:C/.*://}.msg
From f022d2cd17af99bc785bdcb8ea6dca44a8ec03a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20E=C3=9Fer?=
Date: Mon, 3 Aug 2020 20:26:04 +0000
Subject: [PATCH 035/141] Connect the tests provided with the new bc and dc
The tests compare the command output (including of error cases) with the
expected output and exit code.
Not all tests are executed, since some expect to have a known good bc and
dc binary installed and compare results of large amounts of generated data
being processed by both versions to test for regressions.
---
etc/mtree/BSD.tests.dist | 2 ++
usr.bin/gh-bc/Makefile | 5 ++-
usr.bin/gh-bc/tests/Makefile | 67 ++++++++++++++++++++++++++++++++++++
3 files changed, 71 insertions(+), 3 deletions(-)
create mode 100644 usr.bin/gh-bc/tests/Makefile
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist
index 80c4b3e47dc3..8bc8c7e96ac3 100644
--- a/etc/mtree/BSD.tests.dist
+++ b/etc/mtree/BSD.tests.dist
@@ -1002,6 +1002,8 @@
..
getconf
..
+ gh-bc
+ ..
grep
..
gzip
diff --git a/usr.bin/gh-bc/Makefile b/usr.bin/gh-bc/Makefile
index 654752e0df82..87910da8937e 100644
--- a/usr.bin/gh-bc/Makefile
+++ b/usr.bin/gh-bc/Makefile
@@ -59,9 +59,8 @@ MAN_SRC_DC= dc/A.1
CFLAGS+= -flto
.endif
-.if ${MK_TESTS} != "no"
-#SUBDIR+= tests
-.endif
+HAS_TESTS=
+SUBDIR.${MK_TESTS}+= tests
.for catalog in ${CATALOGS}
NLS+= ${catalog:C/.*://}
diff --git a/usr.bin/gh-bc/tests/Makefile b/usr.bin/gh-bc/tests/Makefile
new file mode 100644
index 000000000000..b66509549bee
--- /dev/null
+++ b/usr.bin/gh-bc/tests/Makefile
@@ -0,0 +1,67 @@
+# $FreeBSD$
+
+.include
+
+PACKAGE= tests
+
+TEST_DIR= ${SRCTOP}/contrib/bc
+
+TESTSDIR= ${TESTSBASE}/usr.bin/gh-bc
+
+.PATH: ${SRCTOP}/tests
+
+FILESGROUPS+= FILESf
+FILESfPACKAGE= ${PACKAGE}
+FILESfDIR= ${TESTSDIR}
+FILESf= ${TEST_DIR}/functions.sh
+FILESfMODE= 0755
+
+FILESGROUPS+= FILEStests
+FILEStestsPACKAGE= ${PACKAGE}
+FILEStestsDIR= ${TESTSDIR}/tests
+FILEStests!= echo ${TEST_DIR}/tests/*.py ${TEST_DIR}/tests/*.sh ${TEST_DIR}/tests/*.txt
+FILEStestsMODE= 0755
+
+FILESGROUPS+= FILESbc
+FILESbcPACKAGE= ${PACKAGE}
+FILESbcDIR= ${TESTSDIR}/tests/bc
+FILESbc!= echo ${TEST_DIR}/tests/bc/*.*
+
+FILESGROUPS+= FILESbc_errors
+FILESbc_errorsPACKAGE= ${PACKAGE}
+FILESbc_errorsDIR= ${TESTSDIR}/tests/bc/errors
+FILESbc_errors!= echo ${TEST_DIR}/tests/bc/errors/*.*
+
+FILESGROUPS+= FILESbc_scripts
+FILESbc_scriptsPACKAGE= ${PACKAGE}
+FILESbc_scriptsDIR= ${TESTSDIR}/tests/bc/scripts
+FILESbc_scripts!= echo ${TEST_DIR}/tests/bc/scripts/*.*
+FILESbc_scriptsMODE= 0755
+
+FILESGROUPS+= FILESdc
+FILESdcPACKAGE= ${PACKAGE}
+FILESdcDIR= ${TESTSDIR}/tests/dc
+FILESdc!= echo ${TEST_DIR}/tests/dc/*.*
+
+FILESGROUPS+= FILESdc_errors
+FILESdc_errorsPACKAGE= ${PACKAGE}
+FILESdc_errorsDIR= ${TESTSDIR}/tests/dc/errors
+FILESdc_errors!= echo ${TEST_DIR}/tests/dc/errors/*.*
+
+FILESGROUPS+= FILESdc_scripts
+FILESdc_scriptsPACKAGE= ${PACKAGE}
+FILESdc_scriptsDIR= ${TESTSDIR}/tests/dc/scripts
+FILESdc_scripts!= echo ${TEST_DIR}/tests/dc/scripts/*.*
+FILESdc_scriptsMODE= 0755
+
+PLAIN_TESTS_SH= bc_tests dc_tests
+
+bc_tests.sh:
+ echo "#!/bin/sh" > ${.TARGET}
+ echo "env LANG=C ${TESTSDIR}/tests/all.sh bc 1 1 0 0 bc" >> ${.TARGET}
+
+dc_tests.sh:
+ echo "#!/bin/sh" > ${.TARGET}
+ echo "env LANG=C ${TESTSDIR}/tests/all.sh dc 1 1 0 0 dc" >> ${.TARGET}
+
+.include
From e67c55c998417a2b3ad6d25086e14a96e6fabe69 Mon Sep 17 00:00:00 2001
From: Warner Losh
Date: Mon, 3 Aug 2020 22:12:18 +0000
Subject: [PATCH 036/141] Some function had the blank lines, others didn't.
Most of the ones that didn't were newer, so remove this now-optional blank
line everywhere.
---
sys/kern/subr_bus.c | 30 ------------------------------
1 file changed, 30 deletions(-)
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index f75ab7df40bb..ca99201577d2 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -234,7 +234,6 @@ devclass_sysctl_handler(SYSCTL_HANDLER_ARGS)
static void
devclass_sysctl_init(devclass_t dc)
{
-
if (dc->sysctl_tree != NULL)
return;
sysctl_ctx_init(&dc->sysctl_ctx);
@@ -453,7 +452,6 @@ devinit(void)
static int
devopen(struct cdev *dev, int oflags, int devtype, struct thread *td)
{
-
mtx_lock(&devsoftc.mtx);
if (devsoftc.inuse) {
mtx_unlock(&devsoftc.mtx);
@@ -468,7 +466,6 @@ devopen(struct cdev *dev, int oflags, int devtype, struct thread *td)
static int
devclose(struct cdev *dev, int fflag, int devtype, struct thread *td)
{
-
mtx_lock(&devsoftc.mtx);
devsoftc.inuse = 0;
devsoftc.nonblock = 0;
@@ -522,7 +519,6 @@ static int
devioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
{
switch (cmd) {
-
case FIONBIO:
if (*(int*)data)
devsoftc.nonblock = 1;
@@ -585,7 +581,6 @@ devkqfilter(struct cdev *dev, struct knote *kn)
static void
filt_devctl_detach(struct knote *kn)
{
-
knlist_remove(&devsoftc.sel.si_note, kn, 0);
}
@@ -661,7 +656,6 @@ devctl_queue_data_f(char *data, int flags)
void
devctl_queue_data(char *data)
{
-
devctl_queue_data_f(data, M_NOWAIT);
}
@@ -704,7 +698,6 @@ void
devctl_notify(const char *system, const char *subsystem, const char *type,
const char *data)
{
-
devctl_notify_f(system, subsystem, type, data, M_NOWAIT);
}
@@ -876,7 +869,6 @@ sysctl_devctl_queue(SYSCTL_HANDLER_ARGS)
void
devctl_safe_quote_sb(struct sbuf *sb, const char *src)
{
-
while (*src != '\0') {
if (*src == '"' || *src == '\\')
sbuf_putc(sb, '\\');
@@ -2597,7 +2589,6 @@ device_claim_softc(device_t dev)
void *
device_get_ivars(device_t dev)
{
-
KASSERT(dev != NULL, ("device_get_ivars(NULL, ...)"));
return (dev->ivars);
}
@@ -2608,7 +2599,6 @@ device_get_ivars(device_t dev)
void
device_set_ivars(device_t dev, void * ivars)
{
-
KASSERT(dev != NULL, ("device_set_ivars(NULL, ...)"));
dev->ivars = ivars;
}
@@ -3087,7 +3077,6 @@ device_detach(device_t dev)
int
device_quiesce(device_t dev)
{
-
PDEBUG(("%s", DEVICENAME(dev)));
if (dev->state == DS_BUSY)
return (EBUSY);
@@ -3148,7 +3137,6 @@ device_set_unit(device_t dev, int unit)
void
resource_init_map_request_impl(struct resource_map_request *args, size_t sz)
{
-
bzero(args, sz);
args->size = sz;
args->memattr = VM_MEMATTR_UNCACHEABLE;
@@ -3704,7 +3692,6 @@ resource_list_purge(struct resource_list *rl)
device_t
bus_generic_add_child(device_t dev, u_int order, const char *name, int unit)
{
-
return (device_add_child_ordered(dev, order, name, unit));
}
@@ -3852,7 +3839,6 @@ bus_generic_suspend_child(device_t dev, device_t child)
int
bus_generic_resume_child(device_t dev, device_t child)
{
-
DEVICE_RESUME(child);
child->flags &= ~DF_SUSPENDED;
@@ -3944,7 +3930,6 @@ bus_helper_reset_post(device_t dev, int flags)
static void
bus_helper_reset_prepare_rollback(device_t dev, device_t child, int flags)
{
-
child = TAILQ_NEXT(child, link);
if (child == NULL)
return;
@@ -4356,7 +4341,6 @@ int
bus_generic_bind_intr(device_t dev, device_t child, struct resource *irq,
int cpu)
{
-
/* Propagate up the bus hierarchy until someone handles it. */
if (dev->parent)
return (BUS_BIND_INTR(dev->parent, child, irq, cpu));
@@ -4373,7 +4357,6 @@ int
bus_generic_config_intr(device_t dev, int irq, enum intr_trigger trig,
enum intr_polarity pol)
{
-
/* Propagate up the bus hierarchy until someone handles it. */
if (dev->parent)
return (BUS_CONFIG_INTR(dev->parent, irq, trig, pol));
@@ -4390,7 +4373,6 @@ int
bus_generic_describe_intr(device_t dev, device_t child, struct resource *irq,
void *cookie, const char *descr)
{
-
/* Propagate up the bus hierarchy until someone handles it. */
if (dev->parent)
return (BUS_DESCRIBE_INTR(dev->parent, child, irq, cookie,
@@ -4408,7 +4390,6 @@ int
bus_generic_get_cpus(device_t dev, device_t child, enum cpu_sets op,
size_t setsize, cpuset_t *cpuset)
{
-
/* Propagate up the bus hierarchy until someone handles it. */
if (dev->parent != NULL)
return (BUS_GET_CPUS(dev->parent, child, op, setsize, cpuset));
@@ -4424,7 +4405,6 @@ bus_generic_get_cpus(device_t dev, device_t child, enum cpu_sets op,
bus_dma_tag_t
bus_generic_get_dma_tag(device_t dev, device_t child)
{
-
/* Propagate up the bus hierarchy until someone handles it. */
if (dev->parent != NULL)
return (BUS_GET_DMA_TAG(dev->parent, child));
@@ -4440,7 +4420,6 @@ bus_generic_get_dma_tag(device_t dev, device_t child)
bus_space_tag_t
bus_generic_get_bus_tag(device_t dev, device_t child)
{
-
/* Propagate up the bus hierarchy until someone handles it. */
if (dev->parent != NULL)
return (BUS_GET_BUS_TAG(dev->parent, child));
@@ -4587,7 +4566,6 @@ bus_generic_child_present(device_t dev, device_t child)
int
bus_generic_get_domain(device_t dev, device_t child, int *domain)
{
-
if (dev->parent)
return (BUS_GET_DOMAIN(dev->parent, dev, domain));
@@ -4603,7 +4581,6 @@ bus_generic_get_domain(device_t dev, device_t child, int *domain)
int
bus_null_rescan(device_t dev)
{
-
return (ENXIO);
}
@@ -5101,7 +5078,6 @@ static int
root_get_cpus(device_t dev, device_t child, enum cpu_sets op, size_t setsize,
cpuset_t *cpuset)
{
-
switch (op) {
case INTR_CPUS:
/* Default to returning the set of all CPUs. */
@@ -5182,7 +5158,6 @@ DECLARE_MODULE(rootbus, root_bus_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
void
root_bus_configure(void)
{
-
PDEBUG(("."));
/* Eventually this will be split up, but this is sufficient for now. */
@@ -5556,7 +5531,6 @@ bus_data_generation_check(int generation)
void
bus_data_generation_update(void)
{
-
atomic_add_int(&bus_data_generation, 1);
}
@@ -5944,7 +5918,6 @@ static struct cdevsw devctl2_cdevsw = {
static void
devctl2_init(void)
{
-
make_dev_credf(MAKEDEV_ETERNAL, &devctl2_cdevsw, 0, NULL,
UID_ROOT, GID_WHEEL, 0600, "devctl2");
}
@@ -5960,7 +5933,6 @@ SYSCTL_INT(_debug, OID_AUTO, obsolete_panic, CTLFLAG_RWTUN, &obsolete_panic, 0,
static void
gone_panic(int major, int running, const char *msg)
{
-
switch (obsolete_panic)
{
case 0:
@@ -5977,7 +5949,6 @@ gone_panic(int major, int running, const char *msg)
void
_gone_in(int major, const char *msg)
{
-
gone_panic(major, P_OSREL_MAJOR(__FreeBSD_version), msg);
if (P_OSREL_MAJOR(__FreeBSD_version) >= major)
printf("Obsolete code will be removed soon: %s\n", msg);
@@ -5989,7 +5960,6 @@ _gone_in(int major, const char *msg)
void
_gone_in_dev(device_t dev, int major, const char *msg)
{
-
gone_panic(major, P_OSREL_MAJOR(__FreeBSD_version), msg);
if (P_OSREL_MAJOR(__FreeBSD_version) >= major)
device_printf(dev,
From 6e0c8e1ae292e567ba6260d9a6c0b771629a89e3 Mon Sep 17 00:00:00 2001
From: Konstantin Belousov
Date: Mon, 3 Aug 2020 22:13:02 +0000
Subject: [PATCH 037/141] Add SOL_LOCAL symbolic constant for unix socket
option level.
The constant seems to exists on MacOS X >= 10.8.
Requested by: swills
Reviewed by: allanjude, kevans
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D25933
---
lib/libc/gen/getpeereid.c | 2 +-
share/man/man4/unix.4 | 6 ++++--
sys/kern/uipc_usrreq.c | 2 +-
sys/sys/un.h | 2 ++
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/libc/gen/getpeereid.c b/lib/libc/gen/getpeereid.c
index 530ae0e6100e..86396d359ba3 100644
--- a/lib/libc/gen/getpeereid.c
+++ b/lib/libc/gen/getpeereid.c
@@ -47,7 +47,7 @@ getpeereid(int s, uid_t *euid, gid_t *egid)
int error;
xuclen = sizeof(xuc);
- error = _getsockopt(s, 0, LOCAL_PEERCRED, &xuc, &xuclen);
+ error = _getsockopt(s, SOL_LOCAL, LOCAL_PEERCRED, &xuc, &xuclen);
if (error != 0)
return (error);
if (xuc.cr_version != XUCRED_VERSION) {
diff --git a/share/man/man4/unix.4 b/share/man/man4/unix.4
index 8832e5eff870..569e6dd25208 100644
--- a/share/man/man4/unix.4
+++ b/share/man/man4/unix.4
@@ -28,7 +28,7 @@
.\" @(#)unix.4 8.1 (Berkeley) 6/9/93
.\" $FreeBSD$
.\"
-.Dd August 19, 2018
+.Dd August 3, 2020
.Dt UNIX 4
.Os
.Sh NAME
@@ -195,7 +195,9 @@ The sending process could have exited and its process ID already been
reused for a new process.
.Sh SOCKET OPTIONS
.Tn UNIX
-domain sockets support a number of socket options which can be set with
+domain sockets support a number of socket options for the options level
+.Dv SOL_LOCAL ,
+which can be set with
.Xr setsockopt 2
and tested with
.Xr getsockopt 2 :
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index efd592f82fe2..6261135f64ad 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1470,7 +1470,7 @@ uipc_ctloutput(struct socket *so, struct sockopt *sopt)
struct xucred xu;
int error, optval;
- if (sopt->sopt_level != 0)
+ if (sopt->sopt_level != SOL_LOCAL)
return (EINVAL);
unp = sotounpcb(so);
diff --git a/sys/sys/un.h b/sys/sys/un.h
index 3c408628ce0a..3a011aeef635 100644
--- a/sys/sys/un.h
+++ b/sys/sys/un.h
@@ -62,6 +62,8 @@ struct sockaddr_un {
#if __BSD_VISIBLE
+#define SOL_LOCAL 0 /* Options for local socket */
+
/* Socket options. */
#define LOCAL_PEERCRED 1 /* retrieve peer credentials */
#define LOCAL_CREDS 2 /* pass credentials to receiver */
From ba8b64de05d0df84ad9064be950ca38bc7bafe7d Mon Sep 17 00:00:00 2001
From: Kyle Evans
Date: Tue, 4 Aug 2020 02:06:49 +0000
Subject: [PATCH 038/141] regex(3): belatedly document REG_POSIX from r363734
My original patch included this documented, but it appears that I failed to
include the manpage update. Do so now.
---
lib/libc/regex/regex.3 | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/lib/libc/regex/regex.3 b/lib/libc/regex/regex.3
index 8959272e9891..d22dec1e87f7 100644
--- a/lib/libc/regex/regex.3
+++ b/lib/libc/regex/regex.3
@@ -32,7 +32,7 @@
.\" @(#)regex.3 8.4 (Berkeley) 3/20/94
.\" $FreeBSD$
.\"
-.Dd May 25, 2016
+.Dd April 15, 2017
.Dt REGEX 3
.Os
.Sh NAME
@@ -183,6 +183,17 @@ compatible with but not specified by
.St -p1003.2 ,
and should be used with
caution in software intended to be portable to other systems.
+.It Dv REG_POSIX
+Compile only
+.St -p1003.2
+compliant expressions.
+This flag has no effect unless linking against
+.Nm libregex .
+This is an extension,
+compatible with but not specified by
+.St -p1003.2 ,
+and should be used with
+caution in software intended to be portable to other systems.
.El
.Pp
When successful,
From 18a1e2e9b9f109a78c5a9274e4cfb4777801b4fb Mon Sep 17 00:00:00 2001
From: Kyle Evans
Date: Tue, 4 Aug 2020 02:14:51 +0000
Subject: [PATCH 039/141] libregex: Implement a subset of the GNU extensions
The entire patch-set is not yet mature enough for commit, but this usable
subset is generally enough for googletest to be happy with and mostly map to
some existing concepts, so they're not as invasive.
The specific changes included here are:
- Branching in BREs with \|
- \w and \W for [[:alnum:]] and [^[:alnum:]] respectively
- \s and \S for [[:space:]] and [^[:space:]] respectively
- Additional quantifiers in BREs, \? and \+ (self-explanatory)
There's some #ifdef'd out work for allowing empty branches as a match-all.
This is a feature that's under assessment... future work will determine
how standard this behavior is and act accordingly.
---
lib/libc/regex/regcomp.c | 314 ++++++++++++++++++++++++++++-----------
lib/libc/regex/regex2.h | 1 +
2 files changed, 230 insertions(+), 85 deletions(-)
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index 28bad13ac365..527d0cd3cb42 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -92,6 +92,7 @@ struct parse {
const char *next; /* next character in RE */
const char *end; /* end of string (-> NUL normally) */
int error; /* has an error been seen? */
+ int gnuext;
sop *strip; /* malloced strip */
sopno ssize; /* malloced strip size (allocated) */
sopno slen; /* malloced strip length (used) */
@@ -131,7 +132,9 @@ static int p_count(struct parse *p);
static void p_bracket(struct parse *p);
static int p_range_cmp(wchar_t c1, wchar_t c2);
static void p_b_term(struct parse *p, cset *cs);
+static int p_b_pseudoclass(struct parse *p, char c);
static void p_b_cclass(struct parse *p, cset *cs);
+static void p_b_cclass_named(struct parse *p, cset *cs, const char[]);
static void p_b_eclass(struct parse *p, cset *cs);
static wint_t p_b_symbol(struct parse *p);
static wint_t p_b_coll_elem(struct parse *p, wint_t endc);
@@ -181,6 +184,7 @@ static char nuls[10]; /* place to point scanner in event of error */
#define SEESPEC(a) (p->bre ? SEETWO('\\', a) : SEE(a))
#define EAT(c) ((SEE(c)) ? (NEXT(), 1) : 0)
#define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0)
+#define EATSPEC(a) (p->bre ? EATTWO('\\', a) : EAT(a))
#define NEXT() (p->next++)
#define NEXT2() (p->next += 2)
#define NEXTn(n) (p->next += (n))
@@ -270,14 +274,22 @@ regcomp_internal(regex_t * __restrict preg,
p->pbegin[i] = 0;
p->pend[i] = 0;
}
+#ifdef LIBREGEX
+ if (cflags®_POSIX) {
+ p->gnuext = false;
+ p->allowbranch = (cflags & REG_EXTENDED) != 0;
+ } else
+ p->gnuext = p->allowbranch = true;
+#else
+ p->gnuext = false;
+ p->allowbranch = (cflags & REG_EXTENDED) != 0;
+#endif
if (cflags & REG_EXTENDED) {
- p->allowbranch = true;
p->bre = false;
p->parse_expr = p_ere_exp;
p->pre_parse = NULL;
p->post_parse = NULL;
} else {
- p->allowbranch = false;
p->bre = true;
p->parse_expr = p_simp_re;
p->pre_parse = p_bre_pre_parse;
@@ -388,6 +400,10 @@ p_ere_exp(struct parse *p, struct branchc *bc)
sopno pos;
int count;
int count2;
+#ifdef LIBREGEX
+ int i;
+ int handled;
+#endif
sopno subno;
int wascaret = 0;
@@ -395,6 +411,9 @@ p_ere_exp(struct parse *p, struct branchc *bc)
assert(MORE()); /* caller should have ensured this */
c = GETNEXT();
+#ifdef LIBREGEX
+ handled = 0;
+#endif
pos = HERE();
switch (c) {
case '(':
@@ -457,6 +476,47 @@ p_ere_exp(struct parse *p, struct branchc *bc)
case '\\':
(void)REQUIRE(MORE(), REG_EESCAPE);
wc = WGETNEXT();
+#ifdef LIBREGEX
+ if (p->gnuext) {
+ handled = 1;
+ switch (wc) {
+ case 'W':
+ case 'w':
+ case 'S':
+ case 's':
+ p_b_pseudoclass(p, wc);
+ break;
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ i = wc - '0';
+ assert(i < NPAREN);
+ if (p->pend[i] != 0) {
+ assert(i <= p->g->nsub);
+ EMIT(OBACK_, i);
+ assert(p->pbegin[i] != 0);
+ assert(OP(p->strip[p->pbegin[i]]) == OLPAREN);
+ assert(OP(p->strip[p->pend[i]]) == ORPAREN);
+ (void) dupl(p, p->pbegin[i]+1, p->pend[i]);
+ EMIT(O_BACK, i);
+ } else
+ SETERROR(REG_ESUBREG);
+ p->g->backrefs = 1;
+ break;
+ default:
+ handled = 0;
+ }
+ /* Don't proceed to the POSIX bits if we've already handled it */
+ if (handled)
+ break;
+ }
+#endif
switch (wc) {
case '<':
EMIT(OBOW, 0);
@@ -567,7 +627,7 @@ p_branch_eat_delim(struct parse *p, struct branchc *bc)
(void)bc;
nskip = 0;
- while (EAT('|'))
+ while (EATSPEC('|'))
++nskip;
return (nskip);
}
@@ -619,9 +679,15 @@ static bool
p_branch_empty(struct parse *p, struct branchc *bc)
{
+#if defined(LIBREGEX) && defined(NOTYET)
+ if (bc->outer)
+ p->g->iflags |= EMPTBR;
+ return (true);
+#else
(void)bc;
SETERROR(REG_EMPTY);
return (false);
+#endif
}
/*
@@ -713,7 +779,11 @@ p_re(struct parse *p,
}
if (p->post_parse != NULL)
p->post_parse(p, &bc);
- (void) REQUIRE(HERE() != bc.start, REG_EMPTY);
+ (void) REQUIRE(p->gnuext || HERE() != bc.start, REG_EMPTY);
+#ifdef LIBREGEX
+ if (HERE() == bc.start && !p_branch_empty(p, &bc))
+ break;
+#endif
if (!p->allowbranch)
break;
/*
@@ -740,101 +810,122 @@ static bool /* was the simple RE an unbackslashed $? */
p_simp_re(struct parse *p, struct branchc *bc)
{
int c;
+ int cc; /* convenient/control character */
int count;
int count2;
sopno pos;
+ bool handled;
int i;
wint_t wc;
sopno subno;
# define BACKSL (1<g->cflags®_NEWLINE)
- nonnewline(p);
- else
- EMIT(OANY, 0);
- break;
- case '[':
- p_bracket(p);
- break;
- case BACKSL|'<':
- EMIT(OBOW, 0);
- break;
- case BACKSL|'>':
- EMIT(OEOW, 0);
- break;
- case BACKSL|'{':
- SETERROR(REG_BADRPT);
- break;
- case BACKSL|'(':
- p->g->nsub++;
- subno = p->g->nsub;
- if (subno < NPAREN)
- p->pbegin[subno] = HERE();
- EMIT(OLPAREN, subno);
- /* the MORE here is an error heuristic */
- if (MORE() && !SEETWO('\\', ')'))
- p_re(p, '\\', ')');
- if (subno < NPAREN) {
- p->pend[subno] = HERE();
- assert(p->pend[subno] != 0);
+ cc = GETNEXT();
+ c = BACKSL | cc;
+#ifdef LIBREGEX
+ if (p->gnuext) {
+ handled = true;
+ switch (c) {
+ case BACKSL|'W':
+ case BACKSL|'w':
+ case BACKSL|'S':
+ case BACKSL|'s':
+ p_b_pseudoclass(p, cc);
+ break;
+ default:
+ handled = false;
+ }
+ }
+#endif
+ }
+ if (!handled) {
+ switch (c) {
+ case '.':
+ if (p->g->cflags®_NEWLINE)
+ nonnewline(p);
+ else
+ EMIT(OANY, 0);
+ break;
+ case '[':
+ p_bracket(p);
+ break;
+ case BACKSL|'<':
+ EMIT(OBOW, 0);
+ break;
+ case BACKSL|'>':
+ EMIT(OEOW, 0);
+ break;
+ case BACKSL|'{':
+ SETERROR(REG_BADRPT);
+ break;
+ case BACKSL|'(':
+ p->g->nsub++;
+ subno = p->g->nsub;
+ if (subno < NPAREN)
+ p->pbegin[subno] = HERE();
+ EMIT(OLPAREN, subno);
+ /* the MORE here is an error heuristic */
+ if (MORE() && !SEETWO('\\', ')'))
+ p_re(p, '\\', ')');
+ if (subno < NPAREN) {
+ p->pend[subno] = HERE();
+ assert(p->pend[subno] != 0);
+ }
+ EMIT(ORPAREN, subno);
+ (void)REQUIRE(EATTWO('\\', ')'), REG_EPAREN);
+ break;
+ case BACKSL|')': /* should not get here -- must be user */
+ SETERROR(REG_EPAREN);
+ break;
+ case BACKSL|'1':
+ case BACKSL|'2':
+ case BACKSL|'3':
+ case BACKSL|'4':
+ case BACKSL|'5':
+ case BACKSL|'6':
+ case BACKSL|'7':
+ case BACKSL|'8':
+ case BACKSL|'9':
+ i = (c&~BACKSL) - '0';
+ assert(i < NPAREN);
+ if (p->pend[i] != 0) {
+ assert(i <= p->g->nsub);
+ EMIT(OBACK_, i);
+ assert(p->pbegin[i] != 0);
+ assert(OP(p->strip[p->pbegin[i]]) == OLPAREN);
+ assert(OP(p->strip[p->pend[i]]) == ORPAREN);
+ (void) dupl(p, p->pbegin[i]+1, p->pend[i]);
+ EMIT(O_BACK, i);
+ } else
+ SETERROR(REG_ESUBREG);
+ p->g->backrefs = 1;
+ break;
+ case '*':
+ /*
+ * Ordinary if used as the first character beyond BOL anchor of
+ * a (sub-)expression, counts as a bad repetition operator if it
+ * appears otherwise.
+ */
+ (void)REQUIRE(bc->nchain == 0, REG_BADRPT);
+ /* FALLTHROUGH */
+ default:
+ if (p->error != 0)
+ return (false); /* Definitely not $... */
+ p->next--;
+ wc = WGETNEXT();
+ if ((c & BACKSL) == 0 || may_escape(p, wc))
+ ordinary(p, wc);
+ else
+ SETERROR(REG_EESCAPE);
+ break;
}
- EMIT(ORPAREN, subno);
- (void)REQUIRE(EATTWO('\\', ')'), REG_EPAREN);
- break;
- case BACKSL|')': /* should not get here -- must be user */
- SETERROR(REG_EPAREN);
- break;
- case BACKSL|'1':
- case BACKSL|'2':
- case BACKSL|'3':
- case BACKSL|'4':
- case BACKSL|'5':
- case BACKSL|'6':
- case BACKSL|'7':
- case BACKSL|'8':
- case BACKSL|'9':
- i = (c&~BACKSL) - '0';
- assert(i < NPAREN);
- if (p->pend[i] != 0) {
- assert(i <= p->g->nsub);
- EMIT(OBACK_, i);
- assert(p->pbegin[i] != 0);
- assert(OP(p->strip[p->pbegin[i]]) == OLPAREN);
- assert(OP(p->strip[p->pend[i]]) == ORPAREN);
- (void) dupl(p, p->pbegin[i]+1, p->pend[i]);
- EMIT(O_BACK, i);
- } else
- SETERROR(REG_ESUBREG);
- p->g->backrefs = 1;
- break;
- case '*':
- /*
- * Ordinary if used as the first character beyond BOL anchor of
- * a (sub-)expression, counts as a bad repetition operator if it
- * appears otherwise.
- */
- (void)REQUIRE(bc->nchain == 0, REG_BADRPT);
- /* FALLTHROUGH */
- default:
- if (p->error != 0)
- return (false); /* Definitely not $... */
- p->next--;
- wc = WGETNEXT();
- if ((c & BACKSL) == 0 || may_escape(p, wc))
- ordinary(p, wc);
- else
- SETERROR(REG_EESCAPE);
- break;
}
if (EAT('*')) { /* implemented as +? */
@@ -843,6 +934,14 @@ p_simp_re(struct parse *p, struct branchc *bc)
ASTERN(O_PLUS, pos);
INSERT(OQUEST_, pos);
ASTERN(O_QUEST, pos);
+#ifdef LIBREGEX
+ } else if (p->gnuext && EATTWO('\\', '?')) {
+ INSERT(OQUEST_, pos);
+ ASTERN(O_QUEST, pos);
+ } else if (p->gnuext && EATTWO('\\', '+')) {
+ INSERT(OPLUS_, pos);
+ ASTERN(O_PLUS, pos);
+#endif
} else if (EATTWO('\\', '{')) {
count = p_count(p);
if (EAT(',')) {
@@ -1034,6 +1133,41 @@ p_b_term(struct parse *p, cset *cs)
}
}
+/*
+ - p_b_pseudoclass - parse a pseudo-class (\w, \W, \s, \S)
+ == static int p_b_pseudoclass(struct parse *p, char c)
+ */
+static int
+p_b_pseudoclass(struct parse *p, char c) {
+ cset *cs;
+
+ if ((cs = allocset(p)) == NULL)
+ return(0);
+
+ if (p->g->cflags®_ICASE)
+ cs->icase = 1;
+
+ switch (c) {
+ case 'W':
+ cs->invert = 1;
+ /* PASSTHROUGH */
+ case 'w':
+ p_b_cclass_named(p, cs, "alnum");
+ break;
+ case 'S':
+ cs->invert = 1;
+ /* PASSTHROUGH */
+ case 's':
+ p_b_cclass_named(p, cs, "space");
+ break;
+ default:
+ return(0);
+ }
+
+ EMIT(OANYOF, (int)(cs - p->g->sets));
+ return(1);
+}
+
/*
- p_b_cclass - parse a character-class name and deal with it
== static void p_b_cclass(struct parse *p, cset *cs);
@@ -1043,7 +1177,6 @@ p_b_cclass(struct parse *p, cset *cs)
{
const char *sp = p->next;
size_t len;
- wctype_t wct;
char clname[16];
while (MORE() && isalpha((uch)PEEK()))
@@ -1055,6 +1188,17 @@ p_b_cclass(struct parse *p, cset *cs)
}
memcpy(clname, sp, len);
clname[len] = '\0';
+
+ p_b_cclass_named(p, cs, clname);
+}
+/*
+ - p_b_cclass_named - deal with a named character class
+ == static void p_b_cclass_named(struct parse *p, cset *cs, const char []);
+ */
+static void
+p_b_cclass_named(struct parse *p, cset *cs, const char clname[]) {
+ wctype_t wct;
+
if ((wct = wctype(clname)) == 0) {
SETERROR(REG_ECTYPE);
return;
diff --git a/lib/libc/regex/regex2.h b/lib/libc/regex/regex2.h
index a1a37172a55b..d608dc603683 100644
--- a/lib/libc/regex/regex2.h
+++ b/lib/libc/regex/regex2.h
@@ -182,6 +182,7 @@ struct re_guts {
# define USEBOL 01 /* used ^ */
# define USEEOL 02 /* used $ */
# define BAD 04 /* something wrong */
+# define EMPTBR 010 /* empty branch present */
int nbol; /* number of ^ used */
int neol; /* number of $ used */
char *must; /* match must contain this string */
From 61898cde69374d5a9994e2074605bc4101aff72d Mon Sep 17 00:00:00 2001
From: Kyle Evans
Date: Tue, 4 Aug 2020 02:16:43 +0000
Subject: [PATCH 040/141] libregex: disable some of the unimplemented test
cases for now
This should allow the tests to actually pass. Future work will uncomment the
unimplemented tests as they're implemented.
---
lib/libregex/tests/gnuext.in | 22 ++++++++++++----------
lib/libregex/tests/libregex_test.sh | 4 ----
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/lib/libregex/tests/gnuext.in b/lib/libregex/tests/gnuext.in
index 86afe499f50a..7d9e4823a67f 100644
--- a/lib/libregex/tests/gnuext.in
+++ b/lib/libregex/tests/gnuext.in
@@ -17,14 +17,16 @@ a\|b\|c b abc a
\s\+ b aSNTb SNT
# Word boundaries (\b, \B, \<, \>, \`, \')
# (is/not boundary, start/end word, start/end subject string)
-\babc\b & abc
+# Most of these are disabled for the moment, and will be re-enabled as
+# we become feature complete.
+#\babc\b & abc
\ & abc
-\Babc\B & abc
-\B[abc]\B & b
-\B[abc]+ - bc
-\B[abc]\+ b bc
-\`abc\' & abc abc
-\`.+\' - abNc abNc
-\`.\+\' b abNc abNc
-(\`a) - Na
-(a\') - aN
+#\Babc\B & abc
+#\B[abc]\B & b
+#\B[abc]+ - bc
+#\B[abc]\+ b bc
+#\`abc\' & abc abc
+#\`.+\' - abNc abNc
+#\`.\+\' b abNc abNc
+#(\`a) - Na
+#(a\') - aN
diff --git a/lib/libregex/tests/libregex_test.sh b/lib/libregex/tests/libregex_test.sh
index 9e41db67e10b..5e4e49c3ad38 100755
--- a/lib/libregex/tests/libregex_test.sh
+++ b/lib/libregex/tests/libregex_test.sh
@@ -30,10 +30,6 @@ check()
{
local dataname="${1}"; shift
- if [ "${dataname}" == "gnuext" ]; then
- atf_expect_fail "GNU extensions are not currently implemented"
- fi
-
prog="$(atf_get_srcdir)/h_regex"
data="$(atf_get_srcdir)/data/${dataname}.in"
From b4af4f93c682e445bf159f0d1ec90b636296c946 Mon Sep 17 00:00:00 2001
From: Kyle Evans
Date: Tue, 4 Aug 2020 02:18:24 +0000
Subject: [PATCH 041/141] gtest: link against libregex for GNU extensions
gtest tests want to use \w ([[:alnum:]]) at the very least, which was
causing them to fail after r363679.
Start linking against libregex so that this shorthand is implemented.
PR: 248452
---
lib/googletest/gtest/Makefile | 2 +-
share/mk/src.libnames.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/googletest/gtest/Makefile b/lib/googletest/gtest/Makefile
index b580c33eb45a..103bf84db5b2 100644
--- a/lib/googletest/gtest/Makefile
+++ b/lib/googletest/gtest/Makefile
@@ -45,7 +45,7 @@ INTERNAL_CUSTOM_INCS+= gtest/internal/custom/gtest.h
SRCS+= gtest-all.cc
-LIBADD+= pthread
+LIBADD+= pthread regex
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests
diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk
index f47e50fb94d5..c2c3d6c4110b 100644
--- a/share/mk/src.libnames.mk
+++ b/share/mk/src.libnames.mk
@@ -320,7 +320,7 @@ _DP_dpv= dialog figpar util ncursesw
_DP_dialog= ncursesw m
_DP_cuse= pthread
_DP_atf_cxx= atf_c
-_DP_gtest= pthread
+_DP_gtest= pthread regex
_DP_gmock= gtest
_DP_gmock_main= gmock
_DP_gtest_main= gtest
From 1546dc216f090ce326f5bbdff1211f3661643bfc Mon Sep 17 00:00:00 2001
From: Kyle Evans
Date: Tue, 4 Aug 2020 02:20:15 +0000
Subject: [PATCH 042/141] Re-enable disabled googletest-port-test tests after
r363820
gtest now links against libregex here, and the tests pass locally.
PR: 248452
---
contrib/googletest/googletest/test/googletest-port-test.cc | 6 ------
1 file changed, 6 deletions(-)
diff --git a/contrib/googletest/googletest/test/googletest-port-test.cc b/contrib/googletest/googletest/test/googletest-port-test.cc
index 0b68d72e75bc..399316f95b63 100644
--- a/contrib/googletest/googletest/test/googletest-port-test.cc
+++ b/contrib/googletest/googletest/test/googletest-port-test.cc
@@ -403,8 +403,6 @@ typedef testing::Types<
TYPED_TEST_CASE(RETest, StringTypes);
// Tests RE's implicit constructors.
-/*
-https://bugs.freebsd.org/248452
TYPED_TEST(RETest, ImplicitConstructorWorks) {
const RE empty(TypeParam(""));
EXPECT_STREQ("", empty.pattern());
@@ -415,7 +413,6 @@ TYPED_TEST(RETest, ImplicitConstructorWorks) {
const RE normal(TypeParam(".*(\\w+)"));
EXPECT_STREQ(".*(\\w+)", normal.pattern());
}
-*/
// Tests that RE's constructors reject invalid regular expressions.
TYPED_TEST(RETest, RejectsInvalidRegex) {
@@ -864,8 +861,6 @@ TEST(MatchRegexAnywhereTest, ReturnsTrueWhenMatchingNonPrefix) {
}
// Tests RE's implicit constructors.
-/*
-https://bugs.freebsd.org/248452
TEST(RETest, ImplicitConstructorWorks) {
const RE empty("");
EXPECT_STREQ("", empty.pattern());
@@ -873,7 +868,6 @@ TEST(RETest, ImplicitConstructorWorks) {
const RE simple("hello");
EXPECT_STREQ("hello", simple.pattern());
}
-*/
// Tests that RE's constructors reject invalid regular expressions.
TEST(RETest, RejectsInvalidRegex) {
From cab7d341dcd98138443bbdb51649f966093a3a84 Mon Sep 17 00:00:00 2001
From: Kyle Evans
Date: Tue, 4 Aug 2020 02:47:24 +0000
Subject: [PATCH 043/141] bsdgrep: switch to libregex for GNU_GREP_COMPAT
libregex is incomplete, but it's a bit less buggy than the in-base
libgnuregex and mostly OK.
While here, rename -DIWTH_GNU -> -DWITH_GNU_COMPAT; the option implies
that we're compatible with the GNU counterpart, not that we're including GNU
anything.
---
usr.bin/grep/Makefile | 4 ++--
usr.bin/grep/grep.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile
index c3b07b9252c6..b51f51c8bd5e 100644
--- a/usr.bin/grep/Makefile
+++ b/usr.bin/grep/Makefile
@@ -61,8 +61,8 @@ MLINKS+= grep.1 egrep.1 \
.endif
.if ${MK_GNU_GREP_COMPAT} != "no"
-CFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DWITH_GNU
-LIBADD+= gnuregex
+CFLAGS+= -DWITH_GNU_COMPAT
+LIBADD+= regex
.endif
HAS_TESTS=
diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c
index 731e46bb112e..576ea96d4f96 100644
--- a/usr.bin/grep/grep.c
+++ b/usr.bin/grep/grep.c
@@ -555,7 +555,7 @@ main(int argc, char *argv[])
filebehave = FILE_MMAP;
break;
case 'V':
-#ifdef WITH_GNU
+#ifdef WITH_GNU_COMPAT
printf(errstr[9], getprogname(), VERSION);
#else
printf(errstr[8], getprogname(), VERSION);
From eb578fec7fd0a044097a44f60e2b2f9137894bea Mon Sep 17 00:00:00 2001
From: Kyle Evans
Date: Tue, 4 Aug 2020 03:43:28 +0000
Subject: [PATCH 044/141] Ensure libregex is built in time for googletest
In lib/Makefile, we document the dependency with SUBDIR_DEPEND
For buildworld orchestration, just prebuild libregex if GOOGLETEST is
enabled. googletest will get built in a later pass.
---
Makefile.inc1 | 4 ++++
lib/Makefile | 1 +
2 files changed, 5 insertions(+)
diff --git a/Makefile.inc1 b/Makefile.inc1
index 805a42befb48..94fd5ef5c515 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2741,6 +2741,10 @@ _prebuild_libs+= gnu/lib/libdialog
gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L
.endif
+.if ${MK_GOOGLETEST} != "no"
+_prebuild_libs+= lib/libregex
+.endif
+
.if ${MK_LIBCPLUSPLUS} != "no"
_prebuild_libs+= lib/libc++
.endif
diff --git a/lib/Makefile b/lib/Makefile
index 3c29635ffda8..45c10e7e5c57 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -107,6 +107,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \
# libraries, those libraries should be listed as build order dependencies here.
SUBDIR_DEPEND_geom= libufs
+SUBDIR_DEPEND_googletest= libregex
SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd libzstd
SUBDIR_DEPEND_libauditdm= libbsm
SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
From 74f32f086b05e181ddfec349ef5c85cc736de36c Mon Sep 17 00:00:00 2001
From: Gordon Bergling
Date: Tue, 4 Aug 2020 08:46:28 +0000
Subject: [PATCH 045/141] directory(3): Add an ERRORS section
- Add an ERRORS section for opendir(3) and closedir(3)
- Document also the errors of readdir(3), readdir_r(3) and telldir(3)
- Convert the code sample into an EXAMPLES section
PR: 75711
Submitted by: abc
Reviewed by: 0mp, bcr, jilles
Approved by: 0mp, bcr, jilles
Obtained from: partial from OpenBSD
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25892
---
lib/libc/gen/directory.3 | 74 ++++++++++++++++++++++++++++++++++++++--
1 file changed, 72 insertions(+), 2 deletions(-)
diff --git a/lib/libc/gen/directory.3 b/lib/libc/gen/directory.3
index 835236e50066..f517a00386c6 100644
--- a/lib/libc/gen/directory.3
+++ b/lib/libc/gen/directory.3
@@ -28,7 +28,7 @@
.\" @(#)directory.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd April 30, 2019
+.Dd August 1, 2020
.Dt DIRECTORY 3
.Os
.Sh NAME
@@ -242,7 +242,7 @@ returns the integer file descriptor associated with the named
.Em directory stream ,
see
.Xr open 2 .
-.Pp
+.Sh EXAMPLES
Sample code which searches a directory for entry ``name'' is:
.Bd -literal -offset indent
dirp = opendir(".");
@@ -258,6 +258,76 @@ while ((dp = readdir(dirp)) != NULL) {
(void)closedir(dirp);
return (NOT_FOUND);
.Ed
+.Sh ERRORS
+The
+.Fn opendir
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er EACCES
+Search permission is denied for the component of the path prefix of
+.Fa filename
+or read permission is denied for
+.Fa filename .
+.It Bq Er ELOOP
+A loop exists in symbolic links encountered during resolution of the
+.Fa filename
+argument.
+.It Bq Er ENAMETOOLONG
+The length of the
+.Fa filename
+argument exceeds
+.Brq Dv PATH_MAX
+or
+a pathname component is longer than
+.Brq Dv NAME_MAX .
+.It Bq Er ENOENT
+A component of
+.Fa filename
+does not name an existing directory or
+.Fa filename
+is an empty string.
+.It Bq Er ENOTDIR
+A component of
+.Fa filename
+is not a directory.
+.El
+.Pp
+The
+.Fn fdopendir
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er EBADF
+The
+.Fa fd
+argument is not a valid file descriptor open for reading.
+.It Bq Er ENOTDIR
+The descriptor
+.Fa fd
+is not associated with a directory.
+.El
+.Pp
+The
+.Fn readdir
+and
+.Fn readdir_r
+functions may also fail and set
+.Va errno
+for any of the errors specified for the routine
+.Xr getdents 2 .
+.Pp
+The
+.Fn telldir
+function may also fail and set
+.Va errno
+for any of the errors specified for the routine
+.Xr realloc 3 .
+.Pp
+The
+.Fn closedir
+function may also fail and set
+.Va errno
+for any of the errors specified for the routine
+.Xr close 2 .
.Sh SEE ALSO
.Xr close 2 ,
.Xr lseek 2 ,
From 3422ca83ba48e5c9174542a2d3ba8225275779a6 Mon Sep 17 00:00:00 2001
From: Gordon Bergling
Date: Tue, 4 Aug 2020 11:13:13 +0000
Subject: [PATCH 046/141] iovctl.conf(5): Use Lk macro for the URL of the UCL
website
PR: 248334
Reported by: chuck at tuffli dot net
Reviewed by: bcr, 0mp
Approved by: bcr, 0mp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25891
---
usr.sbin/iovctl/iovctl.conf.5 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr.sbin/iovctl/iovctl.conf.5 b/usr.sbin/iovctl/iovctl.conf.5
index ad8661280402..a9630f3b3b13 100644
--- a/usr.sbin/iovctl/iovctl.conf.5
+++ b/usr.sbin/iovctl/iovctl.conf.5
@@ -51,7 +51,7 @@ The
.Nm
file uses UCL format.
UCL syntax is documented at the official UCL website:
-http://github.com/vstakhov/libucl.
+.Lk http://github.com/vstakhov/libucl .
.Pp
There are three types of sections in the
.Nm
From 96ad26eefb45c365d423b6dd9be05a1d70958dc1 Mon Sep 17 00:00:00 2001
From: Mark Johnston
Date: Tue, 4 Aug 2020 13:58:36 +0000
Subject: [PATCH 047/141] Remove free_domain() and uma_zfree_domain().
These functions were introduced before UMA started ensuring that freed
memory gets placed in domain-local caches. They no longer serve any
purpose since UMA now provides their functionality by default. Remove
them to simplyify the kernel memory allocator interfaces a bit.
Reviewed by: cem, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25937
---
ObsoleteFiles.inc | 4 ++++
share/man/man9/Makefile | 2 --
share/man/man9/malloc.9 | 6 +-----
share/man/man9/zone.9 | 9 +--------
sys/dev/hwpmc/hwpmc_mod.c | 14 +++++++-------
sys/dev/ioat/ioat.c | 2 +-
sys/dev/iommu/busdma_iommu.c | 8 ++++----
sys/dev/nvme/nvme_qpair.c | 4 ++--
sys/kern/kern_malloc.c | 34 ----------------------------------
sys/kern/subr_bus.c | 6 +++---
sys/net/if.c | 5 +----
sys/sys/malloc.h | 1 -
sys/vm/uma.h | 10 ----------
sys/vm/uma_core.c | 18 ------------------
sys/x86/x86/busdma_bounce.c | 8 ++++----
15 files changed, 28 insertions(+), 103 deletions(-)
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 6db60ca13866..160de5f37f4e 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -36,6 +36,10 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20200803: remove free_domain(9) and uma_zfree_domain(9)
+OLD_FILES+=usr/share/man/man9/free_domain.9.gz
+OLD_FILES+=usr/share/man/man9/uma_zfree_domain.9.gz
+
# 20200729: remove long expired serial drivers
OLD_FILES+=usr/share/man/man4/cy.4.gz
OLD_FILES+=usr/share/man/man4/rc.4.gz
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index ee065b020999..01aaed947fa1 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1378,7 +1378,6 @@ MLINKS+=make_dev.9 destroy_dev.9 \
make_dev.9 make_dev_s.9
MLINKS+=malloc.9 free.9 \
malloc.9 malloc_domainset.9 \
- malloc.9 free_domain.9 \
malloc.9 mallocarray.9 \
malloc.9 MALLOC_DECLARE.9 \
malloc.9 MALLOC_DEFINE.9 \
@@ -2343,7 +2342,6 @@ MLINKS+=zone.9 uma.9 \
zone.9 uma_zdestroy.9 \
zone.9 uma_zfree.9 \
zone.9 uma_zfree_arg.9 \
- zone.9 uma_zfree_domain.9 \
zone.9 uma_zfree_pcpu.9 \
zone.9 uma_zfree_pcpu_arg.9 \
zone.9 uma_zone_get_cur.9 \
diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9
index 7a5e36e6243c..c10a007ec2cb 100644
--- a/share/man/man9/malloc.9
+++ b/share/man/man9/malloc.9
@@ -29,7 +29,7 @@
.\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $
.\" $FreeBSD$
.\"
-.Dd October 30, 2018
+.Dd August 3, 2020
.Dt MALLOC 9
.Os
.Sh NAME
@@ -64,8 +64,6 @@
.In sys/domainset.h
.Ft void *
.Fn malloc_domainset "size_t size" "struct malloc_type *type" "struct domainset *ds" "int flags"
-.Ft void
-.Fn free_domain "void *addr" "struct malloc_type *type"
.Sh DESCRIPTION
The
.Fn malloc
@@ -81,8 +79,6 @@ domain using the specified domain selection policy.
See
.Xr domainset 9
for some example policies.
-Memory allocated with this function should be returned with
-.Fn free_domain .
.Pp
The
.Fn mallocarray
diff --git a/share/man/man9/zone.9 b/share/man/man9/zone.9
index 756cf77f8a83..8efcf00c7b24 100644
--- a/share/man/man9/zone.9
+++ b/share/man/man9/zone.9
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 4, 2020
+.Dd August 3, 2020
.Dt UMA 9
.Os
.Sh NAME
@@ -86,8 +86,6 @@ typedef void (*uma_free)(void *item, vm_size_t size, uint8_t pflag);
.Ft void
.Fn uma_zfree_arg "uma_zone_t zone" "void *item" "void *arg"
.Ft void
-.Fn uma_zfree_domain "uma_zone_t zone" "void *item" "void *arg"
-.Ft void
.Fn uma_zfree_pcpu "uma_zone_t zone" "void *item"
.Ft void
.Fn uma_zfree_pcpu_arg "uma_zone_t zone" "void *item" "void *arg"
@@ -394,11 +392,6 @@ function allows callers to specify a fixed
domain to allocate from.
This uses a guaranteed but slow path in the allocator which reduces
concurrency.
-The
-.Fn uma_zfree_domain
-function should be used to return memory allocated in this fashion.
-This function infers the domain from the pointer and does not require it as an
-argument.
.Pp
The
.Fn uma_zone_prealloc
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c
index d343bdced22d..3e4f0de2c7e4 100644
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -5893,13 +5893,13 @@ pmc_cleanup(void)
KASSERT(pmc_pcpu[cpu]->pc_sb[PMC_UR] != NULL,
("[pmc,%d] Null userret cpu sample buffer cpu=%d", __LINE__,
cpu));
- free_domain(pmc_pcpu[cpu]->pc_sb[PMC_HR]->ps_callchains, M_PMC);
- free_domain(pmc_pcpu[cpu]->pc_sb[PMC_HR], M_PMC);
- free_domain(pmc_pcpu[cpu]->pc_sb[PMC_SR]->ps_callchains, M_PMC);
- free_domain(pmc_pcpu[cpu]->pc_sb[PMC_SR], M_PMC);
- free_domain(pmc_pcpu[cpu]->pc_sb[PMC_UR]->ps_callchains, M_PMC);
- free_domain(pmc_pcpu[cpu]->pc_sb[PMC_UR], M_PMC);
- free_domain(pmc_pcpu[cpu], M_PMC);
+ free(pmc_pcpu[cpu]->pc_sb[PMC_HR]->ps_callchains, M_PMC);
+ free(pmc_pcpu[cpu]->pc_sb[PMC_HR], M_PMC);
+ free(pmc_pcpu[cpu]->pc_sb[PMC_SR]->ps_callchains, M_PMC);
+ free(pmc_pcpu[cpu]->pc_sb[PMC_SR], M_PMC);
+ free(pmc_pcpu[cpu]->pc_sb[PMC_UR]->ps_callchains, M_PMC);
+ free(pmc_pcpu[cpu]->pc_sb[PMC_UR], M_PMC);
+ free(pmc_pcpu[cpu], M_PMC);
}
free(pmc_pcpu, M_PMC);
diff --git a/sys/dev/ioat/ioat.c b/sys/dev/ioat/ioat.c
index f9660a2b233d..7e6a33a4285b 100644
--- a/sys/dev/ioat/ioat.c
+++ b/sys/dev/ioat/ioat.c
@@ -1578,7 +1578,7 @@ ioat_free_ring(struct ioat_softc *ioat, uint32_t size,
struct ioat_descriptor *ring)
{
- free_domain(ring, M_IOAT);
+ free(ring, M_IOAT);
}
static struct ioat_descriptor *
diff --git a/sys/dev/iommu/busdma_iommu.c b/sys/dev/iommu/busdma_iommu.c
index dd1309fd7dc6..428880f85d01 100644
--- a/sys/dev/iommu/busdma_iommu.c
+++ b/sys/dev/iommu/busdma_iommu.c
@@ -410,7 +410,7 @@ iommu_bus_dma_tag_destroy(bus_dma_tag_t dmat1)
1) {
if (dmat == dmat->ctx->tag)
iommu_free_ctx(dmat->ctx);
- free_domain(dmat->segments, M_IOMMU_DMAMAP);
+ free(dmat->segments, M_IOMMU_DMAMAP);
free(dmat, M_DEVBUF);
dmat = parent;
} else
@@ -447,7 +447,7 @@ iommu_bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)
tag->common.nsegments, M_IOMMU_DMAMAP,
DOMAINSET_PREF(tag->common.domain), M_NOWAIT);
if (tag->segments == NULL) {
- free_domain(map, M_IOMMU_DMAMAP);
+ free(map, M_IOMMU_DMAMAP);
*mapp = NULL;
return (ENOMEM);
}
@@ -479,7 +479,7 @@ iommu_bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map1)
return (EBUSY);
}
IOMMU_DOMAIN_UNLOCK(domain);
- free_domain(map, M_IOMMU_DMAMAP);
+ free(map, M_IOMMU_DMAMAP);
}
tag->map_count--;
return (0);
@@ -537,7 +537,7 @@ iommu_bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map1)
map = (struct bus_dmamap_iommu *)map1;
if ((map->flags & BUS_DMAMAP_IOMMU_MALLOC) != 0) {
- free_domain(vaddr, M_DEVBUF);
+ free(vaddr, M_DEVBUF);
map->flags &= ~BUS_DMAMAP_IOMMU_MALLOC;
} else {
KASSERT((map->flags & BUS_DMAMAP_IOMMU_KMEM_ALLOC) != 0,
diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c
index bd2e65857d2f..863b9f58ac3b 100644
--- a/sys/dev/nvme/nvme_qpair.c
+++ b/sys/dev/nvme/nvme_qpair.c
@@ -819,7 +819,7 @@ nvme_qpair_destroy(struct nvme_qpair *qpair)
}
if (qpair->act_tr) {
- free_domain(qpair->act_tr, M_NVME);
+ free(qpair->act_tr, M_NVME);
qpair->act_tr = NULL;
}
@@ -828,7 +828,7 @@ nvme_qpair_destroy(struct nvme_qpair *qpair)
TAILQ_REMOVE(&qpair->free_tr, tr, tailq);
bus_dmamap_destroy(qpair->dma_tag_payload,
tr->payload_dma_map);
- free_domain(tr, M_NVME);
+ free(tr, M_NVME);
}
if (qpair->cmd != NULL) {
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 22c4a8f9e195..300a1692e7df 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -862,40 +862,6 @@ zfree(void *addr, struct malloc_type *mtp)
malloc_type_freed(mtp, size);
}
-void
-free_domain(void *addr, struct malloc_type *mtp)
-{
- uma_zone_t zone;
- uma_slab_t slab;
- u_long size;
-
-#ifdef MALLOC_DEBUG
- if (free_dbg(&addr, mtp) != 0)
- return;
-#endif
-
- /* free(NULL, ...) does nothing */
- if (addr == NULL)
- return;
-
- vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab);
- if (slab == NULL)
- panic("free_domain: address %p(%p) has not been allocated.\n",
- addr, (void *)((u_long)addr & (~UMA_SLAB_MASK)));
-
- if (__predict_true(!malloc_large_slab(slab))) {
- size = zone->uz_size;
-#ifdef INVARIANTS
- free_save_type(addr, mtp, size);
-#endif
- uma_zfree_domain(zone, addr, slab);
- } else {
- size = malloc_large_size(slab);
- free_large(addr, size);
- }
- malloc_type_freed(mtp, size);
-}
-
/*
* realloc: change the size of a memory block
*/
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index ca99201577d2..4bf772a9a94a 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -2542,7 +2542,7 @@ void
device_set_softc(device_t dev, void *softc)
{
if (dev->softc && !(dev->flags & DF_EXTERNALSOFTC))
- free_domain(dev->softc, M_BUS_SC);
+ free(dev->softc, M_BUS_SC);
dev->softc = softc;
if (dev->softc)
dev->flags |= DF_EXTERNALSOFTC;
@@ -2559,7 +2559,7 @@ device_set_softc(device_t dev, void *softc)
void
device_free_softc(void *softc)
{
- free_domain(softc, M_BUS_SC);
+ free(softc, M_BUS_SC);
}
/**
@@ -2826,7 +2826,7 @@ device_set_driver(device_t dev, driver_t *driver)
return (0);
if (dev->softc && !(dev->flags & DF_EXTERNALSOFTC)) {
- free_domain(dev->softc, M_BUS_SC);
+ free(dev->softc, M_BUS_SC);
dev->softc = NULL;
}
device_set_desc(dev, NULL);
diff --git a/sys/net/if.c b/sys/net/if.c
index 59dd38267cfc..a837be09544a 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -629,10 +629,7 @@ if_free_internal(struct ifnet *ifp)
free(ifp->if_description, M_IFDESCR);
free(ifp->if_hw_addr, M_IFADDR);
- if (ifp->if_numa_domain == IF_NODOM)
- free(ifp, M_IFNET);
- else
- free_domain(ifp, M_IFNET);
+ free(ifp, M_IFNET);
}
static void
diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
index 5714e9b73db8..403d85feecb8 100644
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -180,7 +180,6 @@ void *contigmalloc_domainset(unsigned long size, struct malloc_type *type,
__malloc_like __result_use_check __alloc_size(1) __alloc_align(7);
void free(void *addr, struct malloc_type *type);
void zfree(void *addr, struct malloc_type *type);
-void free_domain(void *addr, struct malloc_type *type);
void *malloc(size_t size, struct malloc_type *type, int flags) __malloc_like
__result_use_check __alloc_size(1);
/*
diff --git a/sys/vm/uma.h b/sys/vm/uma.h
index 70f598dfbfee..8de57c35a04e 100644
--- a/sys/vm/uma.h
+++ b/sys/vm/uma.h
@@ -386,16 +386,6 @@ void uma_zfree_pcpu_arg(uma_zone_t zone, void *item, void *arg);
/* Use with SMR zones. */
void uma_zfree_smr(uma_zone_t zone, void *item);
-/*
- * Frees an item back to the specified zone's domain specific pool.
- *
- * Arguments:
- * zone The zone the item was originally allocated out of.
- * item The memory to be freed.
- * arg Argument passed to the destructor
- */
-void uma_zfree_domain(uma_zone_t zone, void *item, void *arg);
-
/*
* Frees an item back to a zone without supplying an argument
*
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index 17da063e3cff..d90423bd9c5f 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -4338,24 +4338,6 @@ cache_free(uma_zone_t zone, uma_cache_t cache, void *udata, void *item,
return (true);
}
-void
-uma_zfree_domain(uma_zone_t zone, void *item, void *udata)
-{
-
- /* Enable entropy collection for RANDOM_ENABLE_UMA kernel option */
- random_harvest_fast_uma(&zone, sizeof(zone), RANDOM_UMA);
-
- CTR2(KTR_UMA, "uma_zfree_domain zone %s(%p)", zone->uz_name, zone);
-
- KASSERT(curthread->td_critnest == 0 || SCHEDULER_STOPPED(),
- ("uma_zfree_domain: called with spinlock or critical section held"));
-
- /* uma_zfree(..., NULL) does nothing, to match free(9). */
- if (item == NULL)
- return;
- zone_free_item(zone, item, udata, SKIP_NONE);
-}
-
static void
slab_free_item(uma_zone_t zone, uma_slab_t slab, void *item)
{
diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c
index 01ad5be99932..59c4ed206b37 100644
--- a/sys/x86/x86/busdma_bounce.c
+++ b/sys/x86/x86/busdma_bounce.c
@@ -271,7 +271,7 @@ bounce_bus_dma_tag_destroy(bus_dma_tag_t dmat)
atomic_subtract_int(&dmat->common.ref_count, 1);
if (dmat->common.ref_count == 0) {
if (dmat->segments != NULL)
- free_domain(dmat->segments, M_DEVBUF);
+ free(dmat->segments, M_DEVBUF);
free(dmat, M_DEVBUF);
/*
* Last reference count, so
@@ -387,7 +387,7 @@ bounce_bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)
}
if (dmat->bounce_zone)
dmat->bounce_zone->map_count--;
- free_domain(map, M_DEVBUF);
+ free(map, M_DEVBUF);
}
dmat->map_count--;
CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat);
@@ -504,7 +504,7 @@ bounce_bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
if (map != NULL)
panic("bus_dmamem_free: Invalid map freed\n");
if ((dmat->bounce_flags & BUS_DMA_KMEM_ALLOC) == 0)
- free_domain(vaddr, M_DEVBUF);
+ free(vaddr, M_DEVBUF);
else
kmem_free((vm_offset_t)vaddr, dmat->common.maxsize);
CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat,
@@ -1188,7 +1188,7 @@ alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages)
M_DEVBUF, DOMAINSET_PREF(dmat->common.domain), M_NOWAIT,
0ul, bz->lowaddr, PAGE_SIZE, 0);
if (bpage->vaddr == 0) {
- free_domain(bpage, M_DEVBUF);
+ free(bpage, M_DEVBUF);
break;
}
bpage->busaddr = pmap_kextract(bpage->vaddr);
From 16fdd8b7ad2945520853dd149110796fb9e66120 Mon Sep 17 00:00:00 2001
From: Emmanuel Vadot
Date: Tue, 4 Aug 2020 14:42:38 +0000
Subject: [PATCH 048/141] linuxkpi: Add linux/sizes.h
This file contain some defines for common sizes.
Sponsored-by: The FreeBSD Foundation
Reviewed by: hselasky, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25941
---
.../linuxkpi/common/include/linux/sizes.h | 51 +++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 sys/compat/linuxkpi/common/include/linux/sizes.h
diff --git a/sys/compat/linuxkpi/common/include/linux/sizes.h b/sys/compat/linuxkpi/common/include/linux/sizes.h
new file mode 100644
index 000000000000..a180cee5f022
--- /dev/null
+++ b/sys/compat/linuxkpi/common/include/linux/sizes.h
@@ -0,0 +1,51 @@
+/*-
+ * Copyright (c) 2020 The FreeBSD Foundation
+ *
+ * This software was developed by Emmanuel Vadot under sponsorship
+ * from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef __LINUX_SIZES_H__
+#define __LINUX_SIZES_H__
+
+#define SZ_1K (1024 * 1)
+#define SZ_4K (1024 * 4)
+#define SZ_8K (1024 * 8)
+#define SZ_16K (1024 * 16)
+#define SZ_32K (1024 * 32)
+#define SZ_64K (1024 * 64)
+#define SZ_128K (1024 * 128)
+#define SZ_256K (1024 * 256)
+#define SZ_512K (1024 * 512)
+
+#define SZ_1M (1024 * 1024 * 1)
+#define SZ_2M (1024 * 1024 * 2)
+#define SZ_8M (1024 * 1024 * 8)
+#define SZ_16M (1024 * 1024 * 16)
+#define SZ_32M (1024 * 1024 * 32)
+#define SZ_64M (1024 * 1024 * 64)
+
+#endif
From 7237a74f3b8f88abe74b03d78f272b104ab33a60 Mon Sep 17 00:00:00 2001
From: Emmanuel Vadot
Date: Tue, 4 Aug 2020 14:44:16 +0000
Subject: [PATCH 049/141] linuxkpi: Add kref_put_lock
Same as kref_put but in addition to calling the rel function it will
acquire the lock first.
Sponsored by: The FreeBSD Foundation
Reviewed by: hselasky, emaste
Differential Revision: https://reviews.freebsd.org/D25942
---
sys/compat/linuxkpi/common/include/linux/kref.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/kref.h b/sys/compat/linuxkpi/common/include/linux/kref.h
index 7411694ad650..cfc5c0231e23 100644
--- a/sys/compat/linuxkpi/common/include/linux/kref.h
+++ b/sys/compat/linuxkpi/common/include/linux/kref.h
@@ -38,6 +38,7 @@
#include
#include
#include
+#include
#include
@@ -77,6 +78,20 @@ kref_put(struct kref *kref, void (*rel)(struct kref *kref))
return 0;
}
+static inline int
+kref_put_lock(struct kref *kref, void (*rel)(struct kref *kref),
+ spinlock_t *lock)
+{
+
+ if (refcount_release(&kref->refcount.counter)) {
+ spin_lock(lock);
+ rel(kref);
+ return (1);
+ }
+ return (0);
+}
+
+
static inline int
kref_sub(struct kref *kref, unsigned int count,
void (*rel)(struct kref *kref))
From 2d946b2e129844aaaa0ac3e10f01509234791da1 Mon Sep 17 00:00:00 2001
From: Emmanuel Vadot
Date: Tue, 4 Aug 2020 14:45:22 +0000
Subject: [PATCH 050/141] linuxkpi: Add nested variant of
mutex_lock_interruptible
We don't do anything with the _nesteds variant so just call mutex_lock_interruptible
Sponsoredby: The FreeBSD Foundation
Reviewed by: hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25944
---
sys/compat/linuxkpi/common/include/linux/mutex.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/mutex.h b/sys/compat/linuxkpi/common/include/linux/mutex.h
index 7558a410f5ef..bdf0b4dbdb2d 100644
--- a/sys/compat/linuxkpi/common/include/linux/mutex.h
+++ b/sys/compat/linuxkpi/common/include/linux/mutex.h
@@ -67,6 +67,8 @@ typedef struct mutex {
linux_mutex_lock_interruptible(_m); \
})
+#define mutex_lock_interruptible_nested(m, c) mutex_lock_interruptible(m)
+
/*
* Reuse the interruptable method since the SX
* lock handles both signals and interrupts:
From dd8c2fa31b68aa7b1fa9831921b90e34e1f18d69 Mon Sep 17 00:00:00 2001
From: Emmanuel Vadot
Date: Tue, 4 Aug 2020 14:48:45 +0000
Subject: [PATCH 051/141] pkgbase: Remove the last users of the FreeBSD-example
package
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D24176
---
share/examples/ipfilter/Makefile | 2 +-
share/examples/smbfs/Makefile | 2 +-
share/examples/smbfs/print/Makefile | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/share/examples/ipfilter/Makefile b/share/examples/ipfilter/Makefile
index e2d2e02897a5..18c8ac734406 100644
--- a/share/examples/ipfilter/Makefile
+++ b/share/examples/ipfilter/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-PACKAGE=examples
+PACKAGE=ipf
FILES= README
# dist sample files
diff --git a/share/examples/smbfs/Makefile b/share/examples/smbfs/Makefile
index e8e5f1cc0d32..a653507f54b0 100644
--- a/share/examples/smbfs/Makefile
+++ b/share/examples/smbfs/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-PACKAGE=examples
+PACKAGE=utilities
FILESDIR= ${SHAREDIR}/examples/smbfs
FILES= dot.nsmbrc
diff --git a/share/examples/smbfs/print/Makefile b/share/examples/smbfs/print/Makefile
index 410e9526593f..0c080c0861b3 100644
--- a/share/examples/smbfs/print/Makefile
+++ b/share/examples/smbfs/print/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-PACKAGE=examples
+PACKAGE=utilities
FILESDIR= ${SHAREDIR}/examples/smbfs/print
FILES= lj6l ljspool printcap.sample tolj
From 38ba9c8bac106517a4a6db9e99bb83fbfa27dd3b Mon Sep 17 00:00:00 2001
From: Emmanuel Vadot
Date: Tue, 4 Aug 2020 14:53:41 +0000
Subject: [PATCH 052/141] Re-apply r363564.
We now have linux/sizes.h in the tree.
---
sys/compat/linuxkpi/common/include/linux/dma-mapping.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
index 2662923eb905..291bd4a8e7ce 100644
--- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
+++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
@@ -38,6 +38,7 @@
#include
#include
#include
+#include
#include
#include
From efec381dd1d9e0e449bcc4cb1f189434f9c7d55c Mon Sep 17 00:00:00 2001
From: Mark Johnston
Date: Tue, 4 Aug 2020 14:59:43 +0000
Subject: [PATCH 053/141] Remove most lingering references to the page lock in
comments.
Finish updating comments to reflect new locking protocols introduced
over the past year. In particular, vm_page_lock is now effectively
unused.
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25868
---
sys/vm/vm_page.c | 19 +++++--------------
sys/vm/vm_page.h | 35 ++++++++++++++++-------------------
sys/vm/vm_pageout.c | 7 +++----
sys/vm/vnode_pager.c | 2 +-
4 files changed, 25 insertions(+), 38 deletions(-)
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index ce107645d6a6..593af4b5a2e4 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -2675,7 +2675,7 @@ vm_page_scan_contig(u_long npages, vm_page_t m_start, vm_page_t m_end,
* ascending order.) (2) It is not reserved, and it is
* transitioning from free to allocated. (Conversely,
* the transition from allocated to free for managed
- * pages is blocked by the page lock.) (3) It is
+ * pages is blocked by the page busy lock.) (3) It is
* allocated but not contained by an object and not
* wired, e.g., allocated by Xen's balloon driver.
*/
@@ -3622,8 +3622,6 @@ vm_page_pqbatch_drain(void)
* Request removal of the given page from its current page
* queue. Physical removal from the queue may be deferred
* indefinitely.
- *
- * The page must be locked.
*/
void
vm_page_dequeue_deferred(vm_page_t m)
@@ -3804,8 +3802,8 @@ vm_page_free_prep(vm_page_t m)
* Returns the given page to the free list, disassociating it
* from any VM object.
*
- * The object must be locked. The page must be locked if it is
- * managed.
+ * The object must be locked. The page must be exclusively busied if it
+ * belongs to an object.
*/
static void
vm_page_free_toq(vm_page_t m)
@@ -3834,9 +3832,6 @@ vm_page_free_toq(vm_page_t m)
* Returns a list of pages to the free list, disassociating it
* from any VM object. In other words, this is equivalent to
* calling vm_page_free_toq() for each page of a list of VM objects.
- *
- * The objects must be locked. The pages must be locked if it is
- * managed.
*/
void
vm_page_free_pages_toq(struct spglist *free, bool update_wire_count)
@@ -3974,8 +3969,6 @@ vm_page_unwire_managed(vm_page_t m, uint8_t nqueue, bool noreuse)
* of wirings transitions to zero and the page is eligible for page out, then
* the page is added to the specified paging queue. If the released wiring
* represented the last reference to the page, the page is freed.
- *
- * A managed page must be locked.
*/
void
vm_page_unwire(vm_page_t m, uint8_t nqueue)
@@ -4022,8 +4015,6 @@ vm_page_unwire_noq(vm_page_t m)
* Ensure that the page ends up in the specified page queue. If the page is
* active or being moved to the active queue, ensure that its act_count is
* at least ACT_INIT but do not otherwise mess with it.
- *
- * A managed page must be locked.
*/
static __always_inline void
vm_page_mvqueue(vm_page_t m, const uint8_t nqueue, const uint16_t nflag)
@@ -4269,14 +4260,14 @@ vm_page_try_remove_write(vm_page_t m)
* vm_page_advise
*
* Apply the specified advice to the given page.
- *
- * The object and page must be locked.
*/
void
vm_page_advise(vm_page_t m, int advice)
{
VM_OBJECT_ASSERT_WLOCKED(m->object);
+ vm_page_assert_xbusied(m);
+
if (advice == MADV_FREE)
/*
* Mark the page clean. This will allow the page to be freed
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h
index 93b3dc411925..039e467491d0 100644
--- a/sys/vm/vm_page.h
+++ b/sys/vm/vm_page.h
@@ -95,19 +95,17 @@
* synchronized using either one of or a combination of locks. If a
* field is annotated with two of these locks then holding either is
* sufficient for read access but both are required for write access.
- * The physical address of a page is used to select its page lock from
- * a pool. The queue lock for a page depends on the value of its queue
- * field and is described in detail below.
+ * The queue lock for a page depends on the value of its queue field and is
+ * described in detail below.
*
* The following annotations are possible:
* (A) the field must be accessed using atomic(9) and may require
* additional synchronization.
* (B) the page busy lock.
* (C) the field is immutable.
- * (F) the per-domain lock for the free queues
+ * (F) the per-domain lock for the free queues.
* (M) Machine dependent, defined by pmap layer.
* (O) the object that the page belongs to.
- * (P) the page lock.
* (Q) the page's queue lock.
*
* The busy lock is an embedded reader-writer lock that protects the
@@ -270,7 +268,7 @@ struct vm_page {
* cleared only when the corresponding object's write lock is held.
*
* VPRC_BLOCKED is used to atomically block wirings via pmap lookups while
- * attempting to tear down all mappings of a given page. The page lock and
+ * attempting to tear down all mappings of a given page. The page busy lock and
* object write lock must both be held in order to set or clear this bit.
*/
#define VPRC_BLOCKED 0x40000000u /* mappings are being removed */
@@ -411,26 +409,25 @@ extern struct mtx_padalign pa_lock[];
*
* PGA_ENQUEUED is set and cleared when a page is inserted into or removed
* from a page queue, respectively. It determines whether the plinks.q field
- * of the page is valid. To set or clear this flag, the queue lock for the
- * page must be held: the page queue lock corresponding to the page's "queue"
- * field if its value is not PQ_NONE, and the page lock otherwise.
+ * of the page is valid. To set or clear this flag, page's "queue" field must
+ * be a valid queue index, and the corresponding page queue lock must be held.
*
* PGA_DEQUEUE is set when the page is scheduled to be dequeued from a page
* queue, and cleared when the dequeue request is processed. A page may
* have PGA_DEQUEUE set and PGA_ENQUEUED cleared, for instance if a dequeue
* is requested after the page is scheduled to be enqueued but before it is
- * actually inserted into the page queue. For allocated pages, the page lock
- * must be held to set this flag, but it may be set by vm_page_free_prep()
- * without the page lock held. The page queue lock must be held to clear the
- * PGA_DEQUEUE flag.
+ * actually inserted into the page queue.
*
* PGA_REQUEUE is set when the page is scheduled to be enqueued or requeued
- * in its page queue. The page lock must be held to set this flag, and the
- * queue lock for the page must be held to clear it.
+ * in its page queue.
*
* PGA_REQUEUE_HEAD is a special flag for enqueuing pages near the head of
- * the inactive queue, thus bypassing LRU. The page lock must be held to
- * set this flag, and the queue lock for the page must be held to clear it.
+ * the inactive queue, thus bypassing LRU.
+ *
+ * The PGA_DEQUEUE, PGA_REQUEUE and PGA_REQUEUE_HEAD flags must be set using an
+ * atomic RMW operation to ensure that the "queue" field is a valid queue index,
+ * and the corresponding page queue lock must be held when clearing any of the
+ * flags.
*
* PGA_SWAP_FREE is used to defer freeing swap space to the pageout daemon
* when the context that dirties the page does not have the object write lock
@@ -451,8 +448,8 @@ extern struct mtx_padalign pa_lock[];
#define PGA_QUEUE_STATE_MASK (PGA_ENQUEUED | PGA_QUEUE_OP_MASK)
/*
- * Page flags. If changed at any other time than page allocation or
- * freeing, the modification must be protected by the vm_page lock.
+ * Page flags. Updates to these flags are not synchronized, and thus they must
+ * be set during page allocation or free to avoid races.
*
* The PG_PCPU_CACHE flag is set at allocation time if the page was
* allocated from a per-CPU cache. It is cleared the next time that the
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 429e8f4edc91..db2aa5f1c1cf 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -257,10 +257,9 @@ vm_pageout_end_scan(struct scan_state *ss)
* physically dequeued if the caller so requests. Otherwise, the returned
* batch may contain marker pages, and it is up to the caller to handle them.
*
- * When processing the batch queue, vm_page_queue() must be used to
- * determine whether the page has been logically dequeued by another thread.
- * Once this check is performed, the page lock guarantees that the page will
- * not be disassociated from the queue.
+ * When processing the batch queue, vm_pageout_defer() must be used to
+ * determine whether the page has been logically dequeued since the batch was
+ * collected.
*/
static __always_inline void
vm_pageout_collect_batch(struct scan_state *ss, const bool dequeue)
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index fa9f4cab16f9..0a1518e94a24 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -1307,7 +1307,7 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount,
* the last page is partially invalid. In this case the filesystem
* may not properly clear the dirty bits for the entire page (which
* could be VM_PAGE_BITS_ALL due to the page having been mmap()d).
- * With the page locked we are free to fix-up the dirty bits here.
+ * With the page busied we are free to fix up the dirty bits here.
*
* We do not under any circumstances truncate the valid bits, as
* this will screw up bogus page replacement.
From cfae6a92ac013c3fd069ba802840b823f87e9457 Mon Sep 17 00:00:00 2001
From: Mark Johnston
Date: Tue, 4 Aug 2020 15:00:02 +0000
Subject: [PATCH 054/141] Remove an incorrect assertion from
in6p_lookup_mcast_ifp().
The socket may be bound to an IPv4-mapped IPv6 address. However, the
inp address is not relevant to the JOIN_GROUP or LEAVE_GROUP operations.
While here remove an unnecessary check for inp == NULL.
Reported by: syzbot+d01ab3d5e6c1516a393c@syzkaller.appspotmail.com
Reviewed by: hselasky
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25888
---
sys/netinet6/in6_mcast.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c
index 9da4fcb775e8..5332aeac99ec 100644
--- a/sys/netinet6/in6_mcast.c
+++ b/sys/netinet6/in6_mcast.c
@@ -1817,31 +1817,27 @@ ip6_getmoptions(struct inpcb *inp, struct sockopt *sopt)
*
* This routine exists to support legacy IPv6 multicast applications.
*
- * If inp is non-NULL, use this socket's current FIB number for any
- * required FIB lookup. Look up the group address in the unicast FIB,
- * and use its ifp; usually, this points to the default next-hop.
- * If the FIB lookup fails, return NULL.
+ * Use the socket's current FIB number for any required FIB lookup. Look up the
+ * group address in the unicast FIB, and use its ifp; usually, this points to
+ * the default next-hop. If the FIB lookup fails, return NULL.
*
* FUTURE: Support multiple forwarding tables for IPv6.
*
* Returns NULL if no ifp could be found.
*/
static struct ifnet *
-in6p_lookup_mcast_ifp(const struct inpcb *inp,
- const struct sockaddr_in6 *gsin6)
+in6p_lookup_mcast_ifp(const struct inpcb *inp, const struct sockaddr_in6 *gsin6)
{
struct nhop_object *nh;
struct in6_addr dst;
uint32_t scopeid;
uint32_t fibnum;
- KASSERT(inp->inp_vflag & INP_IPV6,
- ("%s: not INP_IPV6 inpcb", __func__));
KASSERT(gsin6->sin6_family == AF_INET6,
("%s: not AF_INET6 group", __func__));
in6_splitscope(&gsin6->sin6_addr, &dst, &scopeid);
- fibnum = inp ? inp->inp_inc.inc_fibnum : RT_DEFAULT_FIB;
+ fibnum = inp->inp_inc.inc_fibnum;
nh = fib6_lookup(fibnum, &dst, scopeid, 0, 0);
return (nh ? nh->nh_ifp : NULL);
From 334680ab074cae5c7fa78ebcb04a9765bbf4fcea Mon Sep 17 00:00:00 2001
From: Emmanuel Vadot
Date: Tue, 4 Aug 2020 15:25:22 +0000
Subject: [PATCH 055/141] linuxkpi: Add clear_bit_unlock
This calls clear_bit and adds a memory barrier.
Sponsored by: The FreeBSD Foundation
Reviewed by: hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25943
---
sys/compat/linuxkpi/common/include/linux/bitops.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h
index f3c62596bcf5..7e259760f7c3 100644
--- a/sys/compat/linuxkpi/common/include/linux/bitops.h
+++ b/sys/compat/linuxkpi/common/include/linux/bitops.h
@@ -275,6 +275,13 @@ find_next_zero_bit(const unsigned long *addr, unsigned long size,
#define test_bit(i, a) \
!!(READ_ONCE(((volatile const unsigned long *)(a))[BIT_WORD(i)]) & BIT_MASK(i))
+static inline void
+clear_bit_unlock(long bit, volatile unsigned long *var)
+{
+ clear_bit(bit, var);
+ wmb();
+}
+
static inline int
test_and_clear_bit(long bit, volatile unsigned long *var)
{
From dfb4ecb38b8d9e24667f3c0c7fbb8e5b97186613 Mon Sep 17 00:00:00 2001
From: Emmanuel Vadot
Date: Tue, 4 Aug 2020 15:27:32 +0000
Subject: [PATCH 056/141] linuxkpi: Add time_after32 and time_before32
This compare two 32 bits times
Sponsored by: The FreeBSD Foundation
Reviewed by: kib, hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25700
---
sys/compat/linuxkpi/common/include/linux/jiffies.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/jiffies.h b/sys/compat/linuxkpi/common/include/linux/jiffies.h
index c8fc57725e54..ed2c5f774d23 100644
--- a/sys/compat/linuxkpi/common/include/linux/jiffies.h
+++ b/sys/compat/linuxkpi/common/include/linux/jiffies.h
@@ -45,7 +45,9 @@
#define MAX_JIFFY_OFFSET ((INT_MAX >> 1) - 1)
#define time_after(a, b) ((int)((b) - (a)) < 0)
+#define time_after32(a, b) ((int32_t)((uint32_t)(b) - (uint32_t)(a)) < 0)
#define time_before(a, b) time_after(b,a)
+#define time_before32(a, b) time_after32(b, a)
#define time_after_eq(a, b) ((int)((a) - (b)) >= 0)
#define time_before_eq(a, b) time_after_eq(b, a)
#define time_in_range(a,b,c) \
From a02fb76280fd663aa46843423002d605a7bd0796 Mon Sep 17 00:00:00 2001
From: John Baldwin
Date: Tue, 4 Aug 2020 18:19:29 +0000
Subject: [PATCH 057/141] Turn off errors for -Wmaybe-uninitialized in GCC 6+.
Recent changes to trigger this warning and seem like a
false positive.
Differential Revision: https://reviews.freebsd.org/D25726
---
share/mk/bsd.sys.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 9f96b74dff76..2f2bbe578f30 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -150,7 +150,8 @@ CWARNFLAGS+= -Wno-error=address \
# GCC 6.1.0
.if ${COMPILER_VERSION} >= 60100
-CWARNFLAGS+= -Wno-error=nonnull-compare \
+CWARNFLAGS+= -Wno-error=maybe-uninitialized \
+ -Wno-error=nonnull-compare \
-Wno-error=shift-negative-value \
-Wno-error=tautological-compare \
-Wno-error=unused-const-variable
From 0ea6e5109d681b55886f61822ec23a4404d3eac5 Mon Sep 17 00:00:00 2001
From: John Baldwin
Date: Tue, 4 Aug 2020 18:20:39 +0000
Subject: [PATCH 058/141] Disable errors for -Wredundant-decls for GCC 6+.
GCC triggers warnings for this that clang does not for duplicate
declarations of yylex().
Differential Revision: https://reviews.freebsd.org/D25727
---
share/mk/bsd.sys.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 2f2bbe578f30..afa374f68bca 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -152,6 +152,7 @@ CWARNFLAGS+= -Wno-error=address \
.if ${COMPILER_VERSION} >= 60100
CWARNFLAGS+= -Wno-error=maybe-uninitialized \
-Wno-error=nonnull-compare \
+ -Wno-error=redundant-decls \
-Wno-error=shift-negative-value \
-Wno-error=tautological-compare \
-Wno-error=unused-const-variable
From ec71044958e62e7fc4ea85932beeb12b56b3b98a Mon Sep 17 00:00:00 2001
From: John Baldwin
Date: Tue, 4 Aug 2020 18:23:32 +0000
Subject: [PATCH 059/141] ld.bfd requires an explicit emulation for MIPS for ld
-r.
Unlike lld, ld.bfd doesn't infer the emulation from the first object
file, but assumes its compiled in default for ld -r.
Differential Revision: https://reviews.freebsd.org/D25728
---
lib/csu/mips/Makefile | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/lib/csu/mips/Makefile b/lib/csu/mips/Makefile
index a0c6cdf0be53..372f98d5b18e 100644
--- a/lib/csu/mips/Makefile
+++ b/lib/csu/mips/Makefile
@@ -2,6 +2,27 @@
.PATH: ${.CURDIR:H}/common
+.include
+
CFLAGS+= -DCRT_IRELOC_SUPPRESS
+.if ${MACHINE_ARCH:Mmips64}
+ELFCLASS= 64
+.else
+ELFCLASS= 32
+.endif
+.if ${MACHINE_ARCH:Mmips*el}
+ENDIAN= l
+.else
+ENDIAN= b
+.endif
+.if ${MACHINE_ARCH:Mmipsn32*}
+SUFFIX= n32
+.else
+SUFFIX=
+.endif
+
+# binutils requires an explicit emulation for ld -r
+LDFLAGS.bfd+= -Wl,-m -Wl,elf${ELFCLASS}${ENDIAN}tsmip${SUFFIX}_fbsd
+
.include
From 776b260ae2ec0e4b9ad241541dd5f6d4dba1a0bd Mon Sep 17 00:00:00 2001
From: John Baldwin
Date: Tue, 4 Aug 2020 18:24:46 +0000
Subject: [PATCH 060/141] Disable errors for -Wsystem-headers for GCC on
aarch64.
GCC's own arm_neon.h triggers multiple warnings on both GCC 6 and
GCC 9.
Differential Revision: https://reviews.freebsd.org/D25729
---
share/mk/bsd.sys.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index afa374f68bca..3aa6c7e938e4 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -184,6 +184,11 @@ CWARNFLAGS+= -Wno-error=aggressive-loop-optimizations \
-Wno-error=sizeof-pointer-memaccess \
-Wno-error=stringop-truncation
.endif
+
+# GCC's own arm_neon.h triggers various warnings
+.if ${MACHINE_ARCH} == "aarch64"
+CWARNFLAGS+= -Wno-system-headers
+.endif
.endif # gcc
# How to handle FreeBSD custom printf format specifiers.
From 2554fe8f89383d8dedd834b46a9f616a277f8af4 Mon Sep 17 00:00:00 2001
From: Emmanuel Vadot
Date: Tue, 4 Aug 2020 19:05:45 +0000
Subject: [PATCH 061/141] Import DTS from Linux 5.8
---
Bindings/{ABI.txt => ABI.rst} | 5 +-
Bindings/Makefile | 56 +-
Bindings/arm/altera.yaml | 6 +-
Bindings/arm/amlogic.yaml | 6 +-
.../amlogic/amlogic,meson-gx-ao-secure.yaml | 2 +-
Bindings/arm/arm,scmi.txt | 3 +-
Bindings/arm/arm,vexpress-juno.yaml | 34 +-
Bindings/arm/atmel-at91.yaml | 7 +
Bindings/arm/bitmain.yaml | 2 +-
Bindings/arm/calxeda/hb-sregs.yaml | 49 +
Bindings/arm/calxeda/l2ecc.txt | 15 -
Bindings/arm/calxeda/l2ecc.yaml | 42 +
Bindings/arm/coresight-cti.yaml | 20 +-
Bindings/arm/cpus.yaml | 86 +-
Bindings/arm/freescale/fsl,scu.txt | 8 +-
Bindings/arm/fsl.yaml | 4 +
Bindings/arm/l2c2x0.yaml | 87 +-
Bindings/arm/mediatek.yaml | 22 +
Bindings/arm/mediatek/mediatek,apmixedsys.txt | 1 +
Bindings/arm/mediatek/mediatek,audsys.txt | 1 +
Bindings/arm/mediatek/mediatek,camsys.txt | 1 +
Bindings/arm/mediatek/mediatek,imgsys.txt | 1 +
Bindings/arm/mediatek/mediatek,infracfg.txt | 1 +
Bindings/arm/mediatek/mediatek,mipi0a.txt | 28 +
Bindings/arm/mediatek/mediatek,mmsys.txt | 8 +-
Bindings/arm/mediatek/mediatek,pericfg.txt | 36 -
Bindings/arm/mediatek/mediatek,pericfg.yaml | 65 +
Bindings/arm/mediatek/mediatek,topckgen.txt | 1 +
Bindings/arm/mediatek/mediatek,vcodecsys.txt | 27 +
Bindings/arm/nxp/lpc32xx.yaml | 9 +-
Bindings/arm/psci.yaml | 16 +-
Bindings/arm/qcom.yaml | 7 +
Bindings/arm/realtek.yaml | 21 +
Bindings/arm/renesas,prr.yaml | 2 +-
Bindings/arm/renesas.yaml | 10 +
Bindings/arm/rockchip.yaml | 5 +
Bindings/arm/samsung/exynos-chipid.yaml | 5 +-
Bindings/arm/samsung/samsung-boards.yaml | 1 +
Bindings/arm/socionext/uniphier.yaml | 27 +-
Bindings/arm/stm32/st,mlahb.yaml | 2 +-
Bindings/arm/stm32/st,stm32-syscon.yaml | 6 +-
Bindings/arm/stm32/stm32.yaml | 3 +
Bindings/arm/sunxi.yaml | 5 +
Bindings/arm/syna.txt | 2 +-
Bindings/arm/tegra/nvidia,tegra20-pmc.yaml | 7 +-
Bindings/ata/faraday,ftide010.yaml | 4 +-
Bindings/ata/renesas,rcar-sata.yaml | 1 +
Bindings/ata/sata_highbank.txt | 44 -
Bindings/ata/sata_highbank.yaml | 92 ++
Bindings/auxdisplay/hit,hd44780.txt | 45 -
Bindings/auxdisplay/hit,hd44780.yaml | 96 ++
Bindings/bus/allwinner,sun50i-a64-de2.yaml | 5 +-
Bindings/bus/allwinner,sun8i-a23-rsb.yaml | 4 +-
Bindings/bus/arm,integrator-ap-lm.yaml | 83 ++
Bindings/bus/baikal,bt1-apb.yaml | 90 ++
Bindings/bus/baikal,bt1-axi.yaml | 107 ++
.../bus/socionext,uniphier-system-bus.yaml | 4 +-
.../clock/allwinner,sun4i-a10-gates-clk.yaml | 8 +-
Bindings/clock/baikal,bt1-ccu-div.yaml | 188 +++
Bindings/clock/baikal,bt1-ccu-pll.yaml | 131 ++
Bindings/clock/bitmain,bm1880-clk.yaml | 2 +-
Bindings/clock/calxeda.txt | 17 -
Bindings/clock/calxeda.yaml | 82 ++
Bindings/clock/cirrus,lochnagar.txt | 94 --
Bindings/clock/cirrus,lochnagar.yaml | 78 ++
Bindings/clock/fixed-factor-clock.yaml | 5 +-
Bindings/clock/fsl,plldig.yaml | 19 +-
Bindings/clock/idt,versaclock5.txt | 1 +
Bindings/clock/imx1-clock.txt | 26 -
Bindings/clock/imx1-clock.yaml | 51 +
Bindings/clock/imx21-clock.txt | 27 -
Bindings/clock/imx21-clock.yaml | 51 +
Bindings/clock/imx23-clock.txt | 70 -
Bindings/clock/imx23-clock.yaml | 92 ++
Bindings/clock/imx25-clock.txt | 160 ---
Bindings/clock/imx25-clock.yaml | 186 +++
Bindings/clock/imx27-clock.txt | 27 -
Bindings/clock/imx27-clock.yaml | 55 +
Bindings/clock/imx28-clock.txt | 93 --
Bindings/clock/imx28-clock.yaml | 115 ++
Bindings/clock/imx31-clock.txt | 90 --
Bindings/clock/imx31-clock.yaml | 120 ++
Bindings/clock/imx35-clock.txt | 114 --
Bindings/clock/imx35-clock.yaml | 139 ++
Bindings/clock/imx5-clock.txt | 28 -
Bindings/clock/imx5-clock.yaml | 65 +
Bindings/clock/imx6q-clock.txt | 41 -
Bindings/clock/imx6q-clock.yaml | 71 +
Bindings/clock/imx6sl-clock.txt | 10 -
Bindings/clock/imx6sl-clock.yaml | 47 +
Bindings/clock/imx6sll-clock.txt | 36 -
Bindings/clock/imx6sll-clock.yaml | 65 +
Bindings/clock/imx6sx-clock.txt | 13 -
Bindings/clock/imx6sx-clock.yaml | 69 +
Bindings/clock/imx6ul-clock.txt | 13 -
Bindings/clock/imx6ul-clock.yaml | 65 +
Bindings/clock/imx7d-clock.txt | 13 -
Bindings/clock/imx7d-clock.yaml | 65 +
Bindings/clock/imx8qxp-lpcg.txt | 51 -
Bindings/clock/imx8qxp-lpcg.yaml | 73 +
Bindings/clock/ingenic,cgu.txt | 57 -
Bindings/clock/ingenic,cgu.yaml | 124 ++
Bindings/clock/intel,agilex.yaml | 46 +
Bindings/clock/intel,cgu-lgm.yaml | 44 +
Bindings/clock/marvell,mmp2-audio-clock.yaml | 75 ++
Bindings/clock/marvell,mmp2-clock.yaml | 5 +
Bindings/clock/qcom,a53pll.txt | 22 -
Bindings/clock/qcom,a53pll.yaml | 40 +
Bindings/clock/qcom,gcc-sc7180.yaml | 2 +-
Bindings/clock/qcom,gcc-sm8150.yaml | 2 +-
Bindings/clock/qcom,gcc-sm8250.yaml | 2 +-
Bindings/clock/qcom,gcc.yaml | 3 +
Bindings/clock/qcom,mmcc.yaml | 20 +-
Bindings/clock/qcom,sc7180-dispcc.yaml | 2 +-
Bindings/clock/qcom,sc7180-gpucc.yaml | 2 +-
Bindings/clock/qcom,sc7180-mss.yaml | 2 +-
Bindings/clock/qcom,sc7180-videocc.yaml | 2 +-
Bindings/clock/qcom,sdm845-dispcc.yaml | 2 +-
Bindings/clock/qcom,sdm845-gpucc.yaml | 2 +-
Bindings/clock/qcom,sdm845-videocc.yaml | 2 +-
Bindings/clock/renesas,cpg-div6-clock.yaml | 60 +
Bindings/clock/renesas,cpg-div6-clocks.txt | 40 -
Bindings/clock/renesas,cpg-mssr.yaml | 1 +
Bindings/clock/renesas,cpg-mstp-clocks.txt | 60 -
Bindings/clock/renesas,cpg-mstp-clocks.yaml | 82 ++
.../clock/renesas,rcar-usb2-clock-sel.txt | 4 +-
Bindings/clock/silabs,si5341.txt | 11 +-
Bindings/clock/sprd,sc9863a-clk.yaml | 28 +-
Bindings/connector/usb-connector.yaml | 73 +-
Bindings/cpufreq/nvidia,tegra20-cpufreq.txt | 56 +
.../crypto/allwinner,sun4i-a10-crypto.yaml | 14 +-
Bindings/crypto/allwinner,sun8i-ce.yaml | 16 +-
Bindings/crypto/amlogic,gxl-crypto.yaml | 4 +-
Bindings/crypto/st,stm32-hash.yaml | 9 +-
.../allwinner,sun4i-a10-display-engine.yaml | 7 +-
.../display/allwinner,sun4i-a10-hdmi.yaml | 40 +-
.../display/allwinner,sun4i-a10-tcon.yaml | 63 +-
.../display/allwinner,sun6i-a31-mipi-dsi.yaml | 30 +-
.../display/allwinner,sun8i-a83t-dw-hdmi.yaml | 10 +-
Bindings/display/bridge/adi,adv7123.txt | 50 -
Bindings/display/bridge/analogix,anx7814.yaml | 119 ++
Bindings/display/bridge/anx6345.yaml | 8 +
Bindings/display/bridge/anx7814.txt | 42 -
Bindings/display/bridge/chrontel,ch7033.yaml | 77 ++
Bindings/display/bridge/dumb-vga-dac.txt | 50 -
Bindings/display/bridge/dw_mipi_dsi.txt | 32 -
Bindings/display/bridge/ite,it6505.yaml | 91 ++
Bindings/display/bridge/lvds-codec.yaml | 26 +-
Bindings/display/bridge/nwl-dsi.yaml | 226 ++++
Bindings/display/bridge/ps8640.yaml | 8 +
Bindings/display/bridge/sii902x.txt | 2 +-
Bindings/display/bridge/simple-bridge.yaml | 99 ++
Bindings/display/bridge/snps,dw-mipi-dsi.yaml | 68 +
.../display/bridge/thine,thc63lvd1024.txt | 66 -
.../display/bridge/thine,thc63lvd1024.yaml | 121 ++
Bindings/display/bridge/ti,ths813x.txt | 51 -
Bindings/display/dsi-controller.yaml | 4 +-
Bindings/display/imx/fsl-imx-drm.txt | 4 +-
Bindings/display/imx/ldb.txt | 4 +-
Bindings/display/mediatek/mediatek,dpi.txt | 6 +
Bindings/display/mediatek/mediatek,dsi.txt | 10 +
.../display/panel/arm,versatile-tft-panel.txt | 31 -
.../panel/arm,versatile-tft-panel.yaml | 54 +
.../panel/asus,z00t-tm5p5-nt35596.yaml | 56 +
Bindings/display/panel/boe,himax8279d.txt | 24 -
Bindings/display/panel/boe,himax8279d.yaml | 59 +
Bindings/display/panel/boe,tv101wum-nl6.yaml | 2 +
Bindings/display/panel/display-timings.yaml | 8 +-
.../display/panel/feiyang,fy07024di26a30d.txt | 20 -
.../panel/feiyang,fy07024di26a30d.yaml | 58 +
Bindings/display/panel/ilitek,ili9322.txt | 49 -
Bindings/display/panel/ilitek,ili9322.yaml | 71 +
Bindings/display/panel/ilitek,ili9881c.txt | 20 -
Bindings/display/panel/ilitek,ili9881c.yaml | 50 +
Bindings/display/panel/innolux,p097pfg.txt | 24 -
Bindings/display/panel/innolux,p097pfg.yaml | 56 +
.../display/panel/innolux,p120zdg-bf1.txt | 22 -
.../display/panel/innolux,p120zdg-bf1.yaml | 43 +
Bindings/display/panel/jdi,lt070me05000.txt | 31 -
Bindings/display/panel/jdi,lt070me05000.yaml | 69 +
.../panel/kingdisplay,kd035g6-54nt.txt | 42 -
.../panel/kingdisplay,kd035g6-54nt.yaml | 65 +
.../display/panel/kingdisplay,kd097d04.txt | 22 -
.../display/panel/leadtek,ltk050h3146w.yaml | 51 +
Bindings/display/panel/lg,acx467akm-7.txt | 7 -
Bindings/display/panel/lg,ld070wx3-sl01.txt | 7 -
Bindings/display/panel/lg,lg4573.txt | 19 -
Bindings/display/panel/lg,lg4573.yaml | 45 +
Bindings/display/panel/lg,lh500wx1-sd03.txt | 7 -
Bindings/display/panel/lgphilips,lb035q02.txt | 33 -
.../display/panel/lgphilips,lb035q02.yaml | 59 +
.../display/panel/olimex,lcd-olinuxino.txt | 42 -
.../display/panel/olimex,lcd-olinuxino.yaml | 70 +
.../panel/osddisplays,osd101t2587-53ts.txt | 14 -
Bindings/display/panel/panel-common.yaml | 28 +-
Bindings/display/panel/panel-simple-dsi.yaml | 14 +
Bindings/display/panel/panel-simple.yaml | 22 +-
Bindings/display/panel/panel-timing.yaml | 120 +-
Bindings/display/panel/raydium,rm67191.txt | 41 -
Bindings/display/panel/raydium,rm67191.yaml | 75 ++
.../panel/samsung,amoled-mipi-dsi.yaml | 65 +
Bindings/display/panel/samsung,ld9040.txt | 66 -
Bindings/display/panel/samsung,ld9040.yaml | 107 ++
Bindings/display/panel/samsung,s6d16d0.txt | 30 -
Bindings/display/panel/samsung,s6d16d0.yaml | 56 +
Bindings/display/panel/samsung,s6e3ha2.txt | 31 -
Bindings/display/panel/samsung,s6e63j0x03.txt | 24 -
Bindings/display/panel/samsung,s6e63m0.txt | 33 -
Bindings/display/panel/samsung,s6e63m0.yaml | 60 +
Bindings/display/panel/seiko,43wvf1g.txt | 23 -
Bindings/display/panel/seiko,43wvf1g.yaml | 50 +
Bindings/display/panel/sharp,lq150x1lg11.txt | 36 -
Bindings/display/panel/sharp,lq150x1lg11.yaml | 58 +
Bindings/display/panel/sharp,ls037v7dw01.txt | 43 -
Bindings/display/panel/sharp,ls037v7dw01.yaml | 68 +
Bindings/display/panel/sharp,ls043t1le01.txt | 22 -
Bindings/display/panel/sharp,ls043t1le01.yaml | 51 +
Bindings/display/panel/simple-panel.txt | 1 -
Bindings/display/panel/sitronix,st7701.txt | 30 -
Bindings/display/panel/sitronix,st7701.yaml | 69 +
Bindings/display/panel/sitronix,st7789v.txt | 37 -
Bindings/display/panel/sitronix,st7789v.yaml | 63 +
Bindings/display/panel/sony,acx424akp.yaml | 2 +-
Bindings/display/panel/sony,acx565akm.txt | 30 -
Bindings/display/panel/sony,acx565akm.yaml | 57 +
.../display/panel/startek,startek-kd050c.txt | 4 -
.../display/panel/startek,startek-kd050c.yaml | 33 +
Bindings/display/panel/tpo,td.yaml | 65 +
Bindings/display/panel/tpo,td028ttec1.txt | 32 -
Bindings/display/panel/tpo,td043mtea1.txt | 33 -
Bindings/display/panel/visionox,rm69299.yaml | 57 +
.../display/panel/xinpeng,xpp055c272.yaml | 4 +-
Bindings/display/renesas,cmm.yaml | 18 +-
Bindings/display/renesas,du.txt | 10 +
.../display/rockchip/rockchip,rk3066-hdmi.txt | 72 -
.../rockchip/rockchip,rk3066-hdmi.yaml | 140 ++
Bindings/display/rockchip/rockchip-drm.yaml | 2 +-
Bindings/display/rockchip/rockchip-vop.txt | 74 --
Bindings/display/rockchip/rockchip-vop.yaml | 134 ++
.../display/tegra/nvidia,tegra20-host1x.txt | 73 +-
Bindings/display/ti/ti,am65x-dss.yaml | 19 +-
Bindings/display/ti/ti,j721e-dss.yaml | 34 +-
Bindings/dma/dma-common.yaml | 3 +-
Bindings/dma/ingenic,dma.yaml | 80 ++
Bindings/dma/jz4780-dma.txt | 64 -
Bindings/dma/mtk-uart-apdma.txt | 3 +-
Bindings/dma/renesas,rcar-dmac.txt | 117 --
Bindings/dma/renesas,rcar-dmac.yaml | 150 +++
Bindings/dma/renesas,usb-dmac.txt | 55 -
Bindings/dma/renesas,usb-dmac.yaml | 102 ++
Bindings/dma/sifive,fu540-c000-pdma.yaml | 2 +-
Bindings/dma/st,stm32-dma.yaml | 5 +
Bindings/dma/ti/k3-udma.yaml | 29 +-
Bindings/dsp/fsl,dsp.yaml | 2 +
Bindings/eeprom/at24.yaml | 13 +-
Bindings/example-schema.yaml | 17 +-
Bindings/extcon/extcon-arizona.txt | 76 --
Bindings/extcon/extcon-usbc-cros-ec.yaml | 3 +-
Bindings/extcon/wlf,arizona.yaml | 125 ++
Bindings/firmware/intel,stratix10-svc.txt | 2 +-
.../fpga/intel-stratix10-soc-fpga-mgr.txt | 3 +-
Bindings/gpio/brcm,xgs-iproc-gpio.yaml | 2 +-
Bindings/gpio/fsl-imx-gpio.txt | 35 -
Bindings/gpio/fsl-imx-gpio.yaml | 68 +
Bindings/gpio/gpio-mxs.txt | 88 --
Bindings/gpio/gpio-mxs.yaml | 136 ++
Bindings/gpio/mediatek,mt7621-gpio.txt | 2 +-
Bindings/gpio/renesas,em-gio.yaml | 70 +
Bindings/gpio/renesas,gpio-rcar.txt | 94 --
Bindings/gpio/renesas,rcar-gpio.yaml | 144 ++
Bindings/gpio/sifive,gpio.yaml | 2 +-
Bindings/gpio/snps,dw-apb-gpio.yaml | 133 ++
Bindings/gpio/snps-dwapb-gpio.txt | 65 -
Bindings/gpu/arm,mali-bifrost.yaml | 6 +
Bindings/gpu/arm,mali-midgard.yaml | 20 +-
Bindings/gpu/arm,mali-utgard.yaml | 6 +
Bindings/gpu/vivante,gc.yaml | 2 +-
Bindings/hwmon/adi,axi-fan-control.yaml | 3 +-
Bindings/hwmon/adi,ltc2947.yaml | 32 +-
Bindings/hwmon/adt7475.yaml | 18 +-
Bindings/hwmon/baikal,bt1-pvt.yaml | 107 ++
Bindings/hwmon/cirrus,lochnagar.txt | 26 -
Bindings/hwmon/cirrus,lochnagar.yaml | 35 +
Bindings/hwmon/ti,tmp513.yaml | 21 +-
Bindings/i2c/brcm,bcm2835-i2c.txt | 2 +-
Bindings/i2c/cdns,i2c-r1p10.yaml | 58 +
Bindings/i2c/i2c-cadence.txt | 28 -
Bindings/i2c/i2c-designware.txt | 73 -
Bindings/i2c/i2c-jz4780.txt | 33 -
Bindings/i2c/i2c-mt65xx.txt | 1 +
Bindings/i2c/i2c-qcom-cci.txt | 92 ++
Bindings/i2c/i2c-rk3x.yaml | 10 +-
Bindings/i2c/i2c-xiic.txt | 25 -
Bindings/i2c/i2c.txt | 73 +-
Bindings/i2c/ingenic,i2c.yaml | 88 ++
Bindings/i2c/nuvoton,npcm7xx-i2c.yaml | 62 +
Bindings/i2c/nvidia,tegra20-i2c.txt | 6 +
Bindings/i2c/renesas,i2c.txt | 1 +
Bindings/i2c/renesas,iic.txt | 1 +
Bindings/i2c/snps,designware-i2c.yaml | 156 +++
Bindings/i2c/st,stm32-i2c.yaml | 23 +-
Bindings/i2c/xlnx,xps-iic-2.00.a.yaml | 49 +
Bindings/iio/accel/bma180.txt | 8 +-
Bindings/iio/adc/adi,ad7124.yaml | 9 +-
Bindings/iio/adc/adi,ad9467.yaml | 65 +
Bindings/iio/adc/adi,axi-adc.yaml | 62 +
Bindings/iio/adc/lltc,ltc2496.yaml | 9 +-
Bindings/iio/adc/maxim,max1241.yaml | 63 +
Bindings/iio/adc/microchip,mcp3911.yaml | 7 +-
Bindings/iio/adc/rockchip-saradc.txt | 37 -
Bindings/iio/adc/rockchip-saradc.yaml | 80 ++
Bindings/iio/adc/st,stm32-adc.yaml | 35 +-
Bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 27 +-
Bindings/iio/chemical/ams,ccs811.yaml | 53 +
Bindings/iio/chemical/atlas,sensor.yaml | 8 +-
Bindings/iio/common.yaml | 35 +
Bindings/iio/dac/ltc2632.txt | 8 +-
Bindings/iio/dac/st,stm32-dac.txt | 63 -
Bindings/iio/dac/st,stm32-dac.yaml | 110 ++
Bindings/iio/gyroscope/bmg160.txt | 2 +-
Bindings/iio/imu/adi,adis16475.yaml | 136 ++
Bindings/iio/imu/bmi160.txt | 37 -
Bindings/iio/imu/bosch,bmi160.yaml | 75 ++
Bindings/iio/light/amstaos,tsl2563.yaml | 48 +
Bindings/iio/light/tsl2563.txt | 19 -
Bindings/iio/light/tsl2772.yaml | 13 +-
Bindings/iio/light/vcnl4000.txt | 24 -
Bindings/iio/light/vishay,vcnl4000.yaml | 50 +
Bindings/iio/magnetometer/ak8974.txt | 4 +-
Bindings/iio/proximity/vishay,vcnl3020.yaml | 62 +
Bindings/iio/st-sensors.txt | 1 +
Bindings/iio/temperature/adi,ltc2983.yaml | 60 +-
Bindings/index.rst | 12 +
.../input/allwinner,sun4i-a10-lradc-keys.yaml | 9 +-
Bindings/input/elants_i2c.txt | 34 -
Bindings/input/gpio-keys-polled.txt | 45 -
Bindings/input/gpio-keys.txt | 58 -
Bindings/input/gpio-keys.yaml | 149 +++
Bindings/input/input.yaml | 9 +-
Bindings/input/iqs269a.yaml | 555 ++++++++
Bindings/input/iqs62x-keys.yaml | 7 +-
Bindings/input/msm-vibrator.txt | 36 -
.../input/touchscreen/cypress,cy8ctma140.yaml | 72 +
Bindings/input/touchscreen/edt-ft5x06.yaml | 30 +-
.../input/touchscreen/elan,elants_i2c.yaml | 69 +
Bindings/input/touchscreen/goodix.yaml | 2 +-
Bindings/input/touchscreen/mms114.txt | 3 +-
Bindings/interconnect/fsl,imx8m-noc.yaml | 101 ++
Bindings/interconnect/qcom,msm8916.yaml | 4 +-
Bindings/interconnect/qcom,msm8974.yaml | 4 +-
Bindings/interconnect/qcom,qcs404.yaml | 4 +-
Bindings/interconnect/qcom,sc7180.yaml | 6 +-
Bindings/interconnect/qcom,sdm845.yaml | 4 +-
.../allwinner,sun7i-a20-sc-nmi.yaml | 12 +-
Bindings/interrupt-controller/arm,gic-v3.yaml | 39 +-
Bindings/interrupt-controller/arm,gic.yaml | 9 +
Bindings/interrupt-controller/csky,mpintc.txt | 2 +-
.../interrupt-controller/fsl,irqsteer.txt | 35 -
.../interrupt-controller/fsl,irqsteer.yaml | 89 ++
.../interrupt-controller/ingenic,intc.txt | 28 -
.../interrupt-controller/ingenic,intc.yaml | 63 +
.../intel,ixp4xx-interrupt.yaml | 8 +-
.../interrupt-controller/loongson,htvec.yaml | 57 +
.../loongson,liointc.yaml | 8 +-
.../loongson,pch-msi.yaml | 60 +
.../loongson,pch-pic.yaml | 55 +
.../renesas,intc-irqpin.txt | 62 -
.../renesas,intc-irqpin.yaml | 107 ++
.../interrupt-controller/renesas,irqc.yaml | 3 +-
.../interrupt-controller/st,stm32-exti.yaml | 12 +-
Bindings/iommu/allwinner,sun50i-h6-iommu.yaml | 61 +
Bindings/iommu/arm,smmu.yaml | 8 +-
Bindings/iommu/renesas,ipmmu-vmsa.txt | 73 -
Bindings/iommu/renesas,ipmmu-vmsa.yaml | 98 ++
Bindings/iommu/samsung,sysmmu.yaml | 10 +-
Bindings/ipmi/ipmi-smic.txt | 25 -
Bindings/ipmi/ipmi-smic.yaml | 61 +
Bindings/leds/backlight/qcom-wled.txt | 154 ---
Bindings/leds/backlight/qcom-wled.yaml | 252 ++++
Bindings/leds/common.yaml | 13 +-
Bindings/leds/leds-aw2013.yaml | 90 ++
Bindings/leds/leds-gpio.yaml | 3 +-
Bindings/leds/leds-sgm3140.yaml | 61 +
Bindings/leds/rohm,bd71828-leds.yaml | 9 +-
Bindings/mailbox/fsl,mu.txt | 58 -
Bindings/mailbox/fsl,mu.yaml | 91 ++
Bindings/mailbox/qcom,apcs-kpss-global.txt | 88 --
Bindings/mailbox/qcom,apcs-kpss-global.yaml | 86 ++
Bindings/mailbox/qcom-ipcc.yaml | 80 ++
Bindings/mailbox/sprd-mailbox.yaml | 60 +
Bindings/mailbox/st,stm32-ipcc.yaml | 7 +-
Bindings/mailbox/xlnx,zynqmp-ipi-mailbox.txt | 2 +-
Bindings/media/allwinner,sun4i-a10-csi.yaml | 28 +-
.../allwinner,sun4i-a10-video-engine.yaml | 3 +
Bindings/media/amlogic,gx-vdec.yaml | 20 +-
Bindings/media/amlogic,meson-gx-ao-cec.yaml | 5 +-
Bindings/media/i2c/imx219.yaml | 3 +-
Bindings/media/i2c/ov8856.yaml | 141 ++
Bindings/media/marvell,mmp2-ccic.txt | 50 -
Bindings/media/marvell,mmp2-ccic.yaml | 99 ++
Bindings/media/qcom,sc7180-venus.yaml | 2 +-
Bindings/media/qcom,sdm845-venus-v2.yaml | 2 +-
Bindings/media/qcom,sdm845-venus.yaml | 2 +-
Bindings/media/rc.yaml | 265 ++--
Bindings/media/renesas,ceu.yaml | 37 +-
Bindings/media/renesas,csi2.yaml | 2 +-
Bindings/media/renesas,vin.yaml | 21 +-
Bindings/media/rockchip,vdec.yaml | 73 +
Bindings/media/rockchip-rga.txt | 34 -
Bindings/media/rockchip-rga.yaml | 83 ++
Bindings/media/rockchip-vpu.txt | 43 -
Bindings/media/rockchip-vpu.yaml | 77 ++
Bindings/media/ti,vpe.yaml | 2 +-
Bindings/media/video-interfaces.txt | 370 +++++-
.../memory-controllers/baikal,bt1-l2-ctl.yaml | 63 +
.../memory-controllers/calxeda-ddr-ctrlr.txt | 16 -
.../memory-controllers/calxeda-ddr-ctrlr.yaml | 42 +
Bindings/memory-controllers/exynos-srom.yaml | 13 +-
.../memory-controllers/fsl/imx8m-ddrc.yaml | 6 +-
.../ingenic,jz4780-nemc.txt | 76 --
Bindings/memory-controllers/ingenic,nemc.yaml | 125 ++
.../nvidia,tegra124-emc.yaml | 13 +-
.../nvidia,tegra124-mc.yaml | 5 +-
.../nvidia,tegra210-emc.yaml | 82 ++
.../nvidia,tegra30-emc.yaml | 9 +-
.../memory-controllers/nvidia,tegra30-mc.yaml | 3 +-
Bindings/memory-controllers/renesas,dbsc.txt | 44 -
Bindings/memory-controllers/renesas,dbsc.yaml | 56 +
Bindings/mfd/allwinner,sun4i-a10-ts.yaml | 20 +-
Bindings/mfd/arizona.txt | 101 --
Bindings/mfd/cirrus,lochnagar.txt | 85 --
Bindings/mfd/cirrus,lochnagar.yaml | 352 +++++
Bindings/mfd/cirrus,madera.yaml | 299 +++++
Bindings/mfd/gateworks-gsc.yaml | 196 +++
Bindings/mfd/madera.txt | 114 --
Bindings/mfd/max8998.txt | 8 +
Bindings/mfd/mps,mp2629.yaml | 62 +
Bindings/mfd/mt6397.txt | 19 +-
Bindings/mfd/st,stm32-lptimer.yaml | 4 +-
Bindings/mfd/st,stm32-timers.yaml | 37 +-
Bindings/mfd/st,stpmic1.yaml | 9 +-
Bindings/mfd/syscon.yaml | 17 +-
Bindings/mfd/wlf,arizona.yaml | 280 ++++
Bindings/mips/ingenic/devices.yaml | 4 +
Bindings/mips/loongson/rs780e-acpi.yaml | 40 +
Bindings/misc/olpc,xo1.75-ec.txt | 2 +-
Bindings/mmc/amlogic,meson-mx-sdhc.yaml | 68 +
Bindings/mmc/arasan,sdhci.txt | 57 +
Bindings/mmc/aspeed,sdhci.yaml | 4 +-
Bindings/mmc/cdns,sdhci.yaml | 79 +-
Bindings/mmc/ingenic,mmc.yaml | 79 ++
Bindings/mmc/jz4740.txt | 41 -
Bindings/mmc/mmc-controller.yaml | 37 +-
Bindings/mmc/owl-mmc.yaml | 2 +-
Bindings/mmc/renesas,mmcif.txt | 5 +-
Bindings/mmc/renesas,sdhi.txt | 1 +
Bindings/mmc/rockchip-dw-mshc.yaml | 24 +-
Bindings/mmc/sdhci-msm.txt | 14 +
Bindings/mmc/sdhci-pxa.txt | 50 -
Bindings/mmc/sdhci-pxa.yaml | 102 ++
Bindings/mmc/socionext,uniphier-sd.yaml | 14 +-
Bindings/mmc/synopsys-dw-mshc-common.yaml | 14 +-
Bindings/mtd/allwinner,sun4i-a10-nand.yaml | 13 +-
Bindings/mtd/arasan,nand-controller.yaml | 63 +
Bindings/mtd/brcm,brcmnand.txt | 2 +
Bindings/mtd/denali,nand.yaml | 4 +-
Bindings/mtd/ingenic,jz4780-nand.txt | 92 --
Bindings/mtd/ingenic,nand.yaml | 132 ++
Bindings/mtd/nand-controller.yaml | 27 +-
Bindings/mtd/partition.txt | 3 +
Bindings/net/allwinner,sun8i-a83t-emac.yaml | 4 +-
Bindings/net/amlogic,meson-dwmac.yaml | 23 +-
Bindings/net/calxeda-xgmac.txt | 18 -
Bindings/net/calxeda-xgmac.yaml | 49 +
Bindings/net/can/bosch,m_can.yaml | 105 +-
Bindings/net/ethernet-controller.yaml | 34 +-
Bindings/net/ethernet-phy.yaml | 3 +-
Bindings/net/fsl-fec.txt | 8 +-
Bindings/net/imx-dwmac.txt | 56 +
Bindings/net/mdio.yaml | 50 +-
Bindings/net/mediatek,star-emac.yaml | 89 ++
Bindings/net/mediatek-bluetooth.txt | 2 +-
Bindings/net/nxp,tja11xx.yaml | 61 +
Bindings/net/qca,ar71xx.txt | 45 -
Bindings/net/qca,ar71xx.yaml | 216 +++
Bindings/net/qca,ar803x.yaml | 17 +-
Bindings/net/qcom,ipa.yaml | 22 +-
Bindings/net/qcom,ipq4019-mdio.yaml | 61 +
Bindings/net/qualcomm-bluetooth.txt | 6 +
Bindings/net/realtek-bluetooth.yaml | 54 +
Bindings/net/renesas,ether.yaml | 9 +-
Bindings/net/renesas,ravb.txt | 1 +
Bindings/net/snps,dwmac.yaml | 30 +-
Bindings/net/socionext,uniphier-ave4.txt | 64 -
Bindings/net/socionext,uniphier-ave4.yaml | 111 ++
Bindings/net/stm32-dwmac.txt | 44 -
Bindings/net/stm32-dwmac.yaml | 148 +++
Bindings/net/ti,cpsw-switch.yaml | 18 +-
Bindings/net/ti,davinci-mdio.yaml | 34 +-
Bindings/net/ti,dp83867.txt | 68 -
Bindings/net/ti,dp83867.yaml | 127 ++
Bindings/net/ti,dp83869.yaml | 2 +-
Bindings/net/ti,k3-am654-cpsw-nuss.yaml | 107 +-
Bindings/net/ti,k3-am654-cpts.yaml | 143 ++
Bindings/net/wireless/mediatek,mt76.txt | 3 +
Bindings/net/wireless/qcom,ath10k.txt | 14 +
Bindings/nvmem/imx-iim.txt | 22 -
Bindings/nvmem/imx-iim.yaml | 57 +
Bindings/nvmem/imx-ocotp.txt | 50 -
Bindings/nvmem/imx-ocotp.yaml | 95 ++
Bindings/nvmem/mxs-ocotp.txt | 24 -
Bindings/nvmem/mxs-ocotp.yaml | 50 +
Bindings/nvmem/nvmem.yaml | 2 -
Bindings/nvmem/rockchip-efuse.txt | 54 -
Bindings/nvmem/rockchip-efuse.yaml | 70 +
Bindings/nvmem/st,stm32-romem.yaml | 17 +
Bindings/opp/opp.txt | 17 +-
Bindings/pci/aardvark-pci.txt | 4 +
Bindings/pci/brcm,stb-pcie.yaml | 2 +
Bindings/pci/cdns,cdns-pcie-ep.yaml | 2 +-
Bindings/pci/cdns,cdns-pcie-host.yaml | 3 +-
Bindings/pci/cdns-pcie-ep.yaml | 24 +
Bindings/pci/cdns-pcie-host.yaml | 12 +-
Bindings/pci/cdns-pcie.yaml | 8 -
Bindings/pci/intel-gw-pcie.yaml | 7 +-
Bindings/pci/loongson.yaml | 62 +
Bindings/pci/pci-ep.yaml | 9 +-
Bindings/pci/pci-rcar-gen2.txt | 3 +-
Bindings/pci/rcar-pci-ep.yaml | 77 ++
Bindings/pci/rcar-pci.txt | 3 +-
Bindings/pci/socionext,uniphier-pcie-ep.yaml | 92 ++
.../amlogic,meson-axg-mipi-pcie-analog.yaml | 2 +-
Bindings/phy/amlogic,meson-axg-pcie.yaml | 2 +-
Bindings/phy/amlogic,meson8b-usb2-phy.yaml | 64 +
Bindings/phy/calxeda-combophy.txt | 17 -
Bindings/phy/calxeda-combophy.yaml | 50 +
Bindings/phy/cdns,salvo-phy.yaml | 52 +
Bindings/phy/intel,combo-phy.yaml | 101 ++
Bindings/phy/intel,lgm-emmc-phy.yaml | 2 +-
Bindings/phy/meson-gxl-usb3-phy.txt | 31 -
Bindings/phy/meson8b-usb2-phy.txt | 28 -
Bindings/phy/phy-cadence-torrent.yaml | 59 +-
Bindings/phy/qcom,qmp-phy.yaml | 317 +++++
Bindings/phy/qcom,qmp-usb3-dp-phy.yaml | 140 ++
Bindings/phy/qcom,qusb2-phy.yaml | 65 +-
Bindings/phy/qcom,usb-snps-femto-v2.yaml | 80 ++
Bindings/phy/qcom-qmp-phy.txt | 242 ----
Bindings/phy/qcom-usb-ipq4019-phy.yaml | 50 +
Bindings/phy/rcar-gen2-phy.txt | 3 +-
Bindings/phy/rcar-gen3-phy-usb2.txt | 70 -
Bindings/phy/rcar-gen3-phy-usb3.txt | 52 -
Bindings/phy/renesas,usb2-phy.yaml | 117 ++
Bindings/phy/renesas,usb3-phy.yaml | 78 ++
Bindings/phy/rockchip,px30-dsi-dphy.yaml | 2 +-
Bindings/phy/rockchip-mipi-dphy-rx0.yaml | 73 +
Bindings/phy/socionext,uniphier-pcie-phy.yaml | 77 ++
Bindings/phy/socionext,uniphier-usb2-phy.yaml | 85 ++
.../phy/socionext,uniphier-usb3hs-phy.yaml | 103 ++
.../phy/socionext,uniphier-usb3ss-phy.yaml | 96 ++
Bindings/phy/uniphier-pcie-phy.txt | 36 -
Bindings/phy/uniphier-usb2-phy.txt | 45 -
Bindings/phy/uniphier-usb3-hsphy.txt | 69 -
Bindings/phy/uniphier-usb3-ssphy.txt | 58 -
.../pinctrl/allwinner,sun4i-a10-pinctrl.yaml | 12 +-
Bindings/pinctrl/aspeed,ast2400-pinctrl.yaml | 37 +-
Bindings/pinctrl/aspeed,ast2500-pinctrl.yaml | 46 +-
Bindings/pinctrl/aspeed,ast2600-pinctrl.yaml | 108 +-
Bindings/pinctrl/brcm,bcm2835-gpio.txt | 5 +-
Bindings/pinctrl/cirrus,lochnagar.txt | 141 --
Bindings/pinctrl/cirrus,lochnagar.yaml | 190 +++
Bindings/pinctrl/cirrus,madera-pinctrl.txt | 99 --
Bindings/pinctrl/cirrus,madera.yaml | 122 ++
Bindings/pinctrl/fsl,imx8mm-pinctrl.yaml | 31 +-
Bindings/pinctrl/fsl,imx8mn-pinctrl.yaml | 31 +-
Bindings/pinctrl/fsl,imx8mp-pinctrl.yaml | 31 +-
Bindings/pinctrl/fsl,imx8mq-pinctrl.yaml | 31 +-
Bindings/pinctrl/intel,lgm-io.yaml | 4 +-
Bindings/pinctrl/mscc,ocelot-pinctrl.txt | 4 +-
Bindings/pinctrl/pinmux-node.yaml | 3 +-
Bindings/pinctrl/qcom,ipq6018-pinctrl.yaml | 3 +-
Bindings/pinctrl/qcom,sm8250-pinctrl.yaml | 147 +++
Bindings/pinctrl/renesas,pfc-pinctrl.txt | 3 +-
Bindings/pinctrl/rockchip,pinctrl.txt | 4 +-
Bindings/pinctrl/st,stm32-pinctrl.yaml | 57 +-
Bindings/power/amlogic,meson-ee-pwrc.yaml | 105 +-
Bindings/power/fsl,imx-gpc.txt | 91 --
Bindings/power/fsl,imx-gpc.yaml | 124 ++
Bindings/power/fsl,imx-gpcv2.txt | 77 --
Bindings/power/fsl,imx-gpcv2.yaml | 108 ++
Bindings/power/qcom,rpmpd.yaml | 1 +
Bindings/power/renesas,apmu.yaml | 1 +
Bindings/power/renesas,rcar-sysc.yaml | 1 +
Bindings/power/reset/syscon-reboot-mode.txt | 35 -
Bindings/power/reset/syscon-reboot-mode.yaml | 55 +
Bindings/power/reset/syscon-reboot.yaml | 15 +-
Bindings/power/supply/battery.txt | 6 +
Bindings/power/supply/bq27xxx.txt | 56 -
Bindings/power/supply/bq27xxx.yaml | 91 ++
Bindings/power/supply/cw2015_battery.yaml | 79 ++
Bindings/power/supply/power-supply.yaml | 40 +
Bindings/power/supply/power_supply.txt | 25 +-
Bindings/power/supply/rohm,bd99954.yaml | 155 +++
Bindings/power/supply/sbs,sbs-battery.yaml | 81 ++
Bindings/power/supply/sbs_sbs-battery.txt | 27 -
Bindings/property-units.txt | 4 +
Bindings/pwm/imx-pwm.txt | 27 -
Bindings/pwm/imx-pwm.yaml | 64 +
Bindings/pwm/imx-tpm-pwm.txt | 22 -
Bindings/pwm/imx-tpm-pwm.yaml | 55 +
Bindings/pwm/mxs-pwm.txt | 17 -
Bindings/pwm/mxs-pwm.yaml | 43 +
Bindings/pwm/pwm-samsung.yaml | 27 +-
Bindings/pwm/renesas,pwm-rcar.yaml | 3 +-
Bindings/regulator/anatop-regulator.txt | 40 -
Bindings/regulator/anatop-regulator.yaml | 94 ++
Bindings/regulator/arizona-regulator.txt | 18 -
Bindings/regulator/cirrus,lochnagar.txt | 82 --
Bindings/regulator/gpio-regulator.yaml | 35 +-
Bindings/regulator/maxim,max77826.yaml | 65 +
Bindings/regulator/mps,mp5416.yaml | 6 +-
Bindings/regulator/mps,mpq7920.yaml | 28 +-
Bindings/regulator/regulator.yaml | 5 +-
.../regulator/rohm,bd71828-regulator.yaml | 34 +-
.../regulator/rohm,bd71837-regulator.yaml | 27 +-
.../regulator/rohm,bd71847-regulator.yaml | 27 +-
Bindings/regulator/st,stm32-booster.yaml | 3 +-
Bindings/regulator/st,stm32mp1-pwr-reg.yaml | 3 +-
Bindings/regulator/wlf,arizona.yaml | 37 +
Bindings/remoteproc/ingenic,vpu.yaml | 77 ++
Bindings/remoteproc/qcom,adsp.txt | 12 +
Bindings/remoteproc/qcom,q6v5.txt | 25 +-
Bindings/remoteproc/st,stm32-rproc.yaml | 11 +-
Bindings/reserved-memory/ramoops.txt | 13 +-
Bindings/reserved-memory/reserved-memory.txt | 2 +
.../reset/brcm,bcm7216-pcie-sata-rescal.yaml | 4 +-
Bindings/reset/fsl,imx7-src.txt | 6 +-
Bindings/reset/intel,rcu-gw.yaml | 3 +-
Bindings/reset/renesas,rst.yaml | 1 +
Bindings/riscv/cpus.yaml | 20 +-
Bindings/rng/arm-cctrng.yaml | 52 +
Bindings/rtc/dw-apb.txt | 32 -
Bindings/rtc/renesas,sh-rtc.yaml | 5 +
Bindings/rtc/rtc-mxc.txt | 26 -
Bindings/rtc/rtc-mxc.yaml | 57 +
Bindings/rtc/rtc-mxc_v2.txt | 17 -
Bindings/rtc/rtc-mxc_v2.yaml | 46 +
Bindings/rtc/st,stm32-rtc.yaml | 47 +-
Bindings/serial/8250.txt | 100 --
Bindings/serial/8250.yaml | 233 ++++
Bindings/serial/amlogic,meson-uart.yaml | 16 +-
Bindings/serial/ingenic,uart.txt | 28 -
Bindings/serial/ingenic,uart.yaml | 94 ++
Bindings/serial/mrvl-serial.txt | 4 -
Bindings/serial/nxp,sc16is7xx.txt | 4 +
Bindings/serial/pl011.yaml | 10 +-
Bindings/serial/qca,ar9330-uart.txt | 31 -
Bindings/serial/qca,ar9330-uart.yaml | 50 +
Bindings/serial/renesas,em-uart.yaml | 49 +
Bindings/serial/renesas,hscif.yaml | 1 +
Bindings/serial/renesas,scif.yaml | 1 +
Bindings/serial/renesas,scifa.yaml | 15 +-
Bindings/serial/renesas,scifb.yaml | 1 +
Bindings/serial/rs485.yaml | 47 +-
Bindings/serial/samsung_uart.yaml | 12 +-
Bindings/serial/serial.yaml | 8 +
Bindings/serial/sifive-serial.yaml | 2 +-
Bindings/serial/st,stm32-uart.yaml | 14 +
Bindings/soc/amlogic/amlogic,canvas.yaml | 10 +-
Bindings/soc/qcom/qcom,aoss-qmp.txt | 1 +
Bindings/soc/qcom/qcom,apr.txt | 20 +-
Bindings/soc/qcom/qcom,geni-se.txt | 94 --
Bindings/soc/qcom/qcom,geni-se.yaml | 222 ++++
Bindings/soc/ti/k3-socinfo.yaml | 40 +
Bindings/sound/adi,adau7118.yaml | 20 +-
Bindings/sound/allwinner,sun4i-a10-codec.yaml | 47 +-
Bindings/sound/amlogic,aiu.yaml | 3 +-
Bindings/sound/amlogic,g12a-toacodec.yaml | 2 +-
Bindings/sound/amlogic,t9015.yaml | 3 +-
Bindings/sound/audio-graph-card.txt | 2 +-
Bindings/sound/cirrus,lochnagar.txt | 39 -
Bindings/sound/cirrus,lochnagar.yaml | 52 +
Bindings/sound/cirrus,madera.yaml | 113 ++
Bindings/sound/da7213.txt | 8 +-
Bindings/sound/fsl,asrc.txt | 4 +
Bindings/sound/fsl,easrc.yaml | 98 ++
Bindings/sound/fsl,esai.txt | 1 +
Bindings/sound/madera.txt | 67 -
Bindings/sound/marvell,mmp-sspa.yaml | 122 ++
Bindings/sound/nau8810.txt | 5 +-
Bindings/sound/nau8825.txt | 2 +-
Bindings/sound/nvidia,tegra-audio-wm8903.txt | 1 +
Bindings/sound/qcom,lpass-cpu.txt | 25 +
Bindings/sound/qcom,q6adm.txt | 2 +-
Bindings/sound/qcom,q6afe.txt | 46 +-
Bindings/sound/qcom,q6asm.txt | 7 +-
Bindings/sound/qcom,q6core.txt | 2 +-
Bindings/sound/qcom,wcd934x.yaml | 3 +-
Bindings/sound/renesas,fsi.yaml | 41 +-
Bindings/sound/renesas,rsnd.txt | 1 +
Bindings/sound/rockchip-i2s.yaml | 18 +-
Bindings/sound/rt1016.txt | 17 +
Bindings/sound/simple-card.txt | 351 -----
Bindings/sound/simple-card.yaml | 491 +++++++
Bindings/sound/st,sti-asoc-card.txt | 2 +-
Bindings/sound/tdm-slot.txt | 4 +-
Bindings/sound/tlv320adcx140.yaml | 59 +-
Bindings/sound/wlf,arizona.txt | 53 -
Bindings/sound/wlf,arizona.yaml | 114 ++
Bindings/sound/wm8994.txt | 18 +-
Bindings/sound/zl38060.yaml | 69 +
Bindings/spi/amlogic,meson-gx-spicc.yaml | 26 +-
Bindings/spi/brcm,spi-bcm-qspi.txt | 10 +
Bindings/spi/marvell,mmp2-ssp.yaml | 58 +
Bindings/spi/mikrotik,rb4xx-spi.yaml | 36 +
Bindings/spi/qcom,spi-geni-qcom.txt | 2 +-
Bindings/spi/qcom,spi-qcom-qspi.yaml | 10 +-
Bindings/spi/renesas,hspi.yaml | 4 +-
Bindings/spi/renesas,rspi.yaml | 144 ++
Bindings/spi/renesas,sh-msiof.yaml | 44 +-
Bindings/spi/snps,dw-apb-ssi.txt | 41 -
Bindings/spi/snps,dw-apb-ssi.yaml | 133 ++
Bindings/spi/socionext,uniphier-spi.yaml | 57 +
Bindings/spi/spi-controller.yaml | 14 +-
Bindings/spi/spi-dw.txt | 24 -
Bindings/spi/spi-pl022.yaml | 57 +-
Bindings/spi/spi-pxa2xx.txt | 27 -
Bindings/spi/spi-rspi.txt | 73 -
Bindings/spi/spi-sifive.yaml | 25 +-
Bindings/spi/spi-uniphier.txt | 28 -
Bindings/spi/st,stm32-qspi.yaml | 4 +-
Bindings/spi/ti_qspi.txt | 2 +-
.../allwinner,sun4i-a10-system-control.yaml | 64 +-
Bindings/sram/rockchip-pmu-sram.txt | 16 -
Bindings/sram/sram.yaml | 28 +-
...ing-patches.txt => submitting-patches.rst} | 12 +-
Bindings/thermal/amlogic,thermal.yaml | 10 +-
Bindings/thermal/imx-thermal.txt | 61 -
Bindings/thermal/imx-thermal.yaml | 102 ++
Bindings/thermal/imx8mm-thermal.txt | 15 -
Bindings/thermal/imx8mm-thermal.yaml | 58 +
Bindings/thermal/qcom-tsens.yaml | 7 +-
Bindings/thermal/rcar-gen3-thermal.txt | 60 -
Bindings/thermal/rcar-gen3-thermal.yaml | 99 ++
Bindings/thermal/rcar-thermal.yaml | 7 +-
.../thermal/socionext,uniphier-thermal.yaml | 58 +
Bindings/thermal/sprd-thermal.yaml | 2 +-
Bindings/thermal/thermal-cooling-devices.yaml | 116 ++
Bindings/thermal/thermal-idle.yaml | 145 ++
Bindings/thermal/thermal-sensor.yaml | 72 +
Bindings/thermal/thermal-zones.yaml | 341 +++++
Bindings/thermal/ti,am654-thermal.yaml | 56 +
Bindings/thermal/uniphier-thermal.txt | 65 -
Bindings/timer/arm,arch_timer.yaml | 10 +-
Bindings/timer/arm,arch_timer_mmio.yaml | 11 +-
Bindings/timer/cadence,ttc-timer.txt | 21 -
Bindings/timer/cdns,ttc.yaml | 48 +
Bindings/timer/csky,mptimer.txt | 2 +-
Bindings/timer/fsl,imxgpt.txt | 45 -
Bindings/timer/fsl,imxgpt.yaml | 72 +
Bindings/timer/ingenic,tcu.txt | 138 --
Bindings/timer/ingenic,tcu.yaml | 280 ++++
Bindings/timer/nxp,sysctr-timer.txt | 25 -
Bindings/timer/nxp,sysctr-timer.yaml | 54 +
Bindings/timer/nxp,tpm-timer.txt | 28 -
Bindings/timer/nxp,tpm-timer.yaml | 61 +
Bindings/timer/renesas,cmt.txt | 110 --
Bindings/timer/renesas,cmt.yaml | 182 +++
Bindings/timer/renesas,em-sti.yaml | 46 +
Bindings/timer/renesas,mtu2.txt | 42 -
Bindings/timer/renesas,mtu2.yaml | 76 ++
Bindings/timer/renesas,ostm.txt | 31 -
Bindings/timer/renesas,ostm.yaml | 59 +
Bindings/timer/snps,dw-apb-timer.yaml | 88 ++
Bindings/ufs/ti,j721e-ufs.yaml | 63 +-
Bindings/usb/amlogic,dwc3.txt | 42 -
Bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml | 76 +-
Bindings/usb/aspeed,usb-vhub.yaml | 80 +-
Bindings/usb/atmel-usb.txt | 56 +-
Bindings/usb/brcm,bcm7445-ehci.yaml | 59 +
Bindings/usb/dwc2.yaml | 11 +-
Bindings/usb/dwc3.txt | 2 -
Bindings/usb/ehci-mv.txt | 23 -
Bindings/usb/generic-ehci.yaml | 27 +-
Bindings/usb/generic-ohci.yaml | 6 +
Bindings/usb/ingenic,musb.yaml | 3 +
Bindings/usb/keystone-usb.txt | 56 -
Bindings/usb/marvell,pxau2o-ehci.yaml | 62 +
Bindings/usb/nvidia,tegra-xudc.yaml | 10 +-
Bindings/usb/qcom,dwc3.txt | 104 --
Bindings/usb/qcom,dwc3.yaml | 174 +++
Bindings/usb/renesas,usb3-peri.yaml | 2 +-
Bindings/usb/renesas,usbhs.yaml | 3 +-
Bindings/usb/ti,j721e-usb.yaml | 54 +-
Bindings/usb/ti,keystone-dwc3.yaml | 77 ++
Bindings/usb/ti,tps6598x.yaml | 64 +
Bindings/usb/usb-conn-gpio.txt | 30 -
Bindings/usb/usb-xhci.txt | 2 +
Bindings/vendor-prefixes.yaml | 40 +-
Bindings/watchdog/arm-smc-wdt.yaml | 36 +
Bindings/watchdog/fsl-imx-wdt.txt | 24 -
Bindings/watchdog/fsl-imx-wdt.yaml | 54 +
Bindings/watchdog/fsl-imx7ulp-wdt.txt | 22 -
Bindings/watchdog/fsl-imx7ulp-wdt.yaml | 60 +
Bindings/watchdog/renesas,wdt.txt | 50 -
Bindings/watchdog/renesas,wdt.yaml | 101 ++
Bindings/watchdog/socionext,uniphier-wdt.yaml | 36 +
Bindings/watchdog/ti,rti-wdt.yaml | 2 +-
Bindings/watchdog/uniphier-wdt.txt | 20 -
...ting-bindings.txt => writing-bindings.rst} | 9 +-
Bindings/xilinx.txt | 143 --
include/dt-bindings/clock/agilex-clock.h | 70 +
include/dt-bindings/clock/at91.h | 4 +
include/dt-bindings/clock/bt1-ccu.h | 48 +
include/dt-bindings/clock/imx7ulp-clock.h | 5 +-
include/dt-bindings/clock/imx8mp-clock.h | 90 +-
include/dt-bindings/clock/intel,lgm-clk.h | 165 +++
.../dt-bindings/clock/marvell,mmp2-audio.h | 10 +
include/dt-bindings/clock/marvell,mmp2.h | 3 +
include/dt-bindings/clock/meson8b-clkc.h | 1 +
include/dt-bindings/clock/mt6765-clk.h | 313 +++++
include/dt-bindings/clock/qcom,gcc-msm8939.h | 206 +++
include/dt-bindings/clock/qcom,gcc-msm8998.h | 1 +
include/dt-bindings/clock/qcom,gcc-sc7180.h | 1 +
include/dt-bindings/clock/r8a7742-cpg-mssr.h | 42 +
include/dt-bindings/clock/sprd,sc9863a-clk.h | 5 +
include/dt-bindings/clock/tegra114-car.h | 14 +-
.../dt-bindings/clock/tegra124-car-common.h | 14 +-
include/dt-bindings/clock/tegra20-car.h | 2 +-
include/dt-bindings/clock/tegra210-car.h | 20 +-
include/dt-bindings/clock/tegra30-car.h | 14 +-
include/dt-bindings/clock/x1000-cgu.h | 64 +-
include/dt-bindings/clock/x1830-cgu.h | 55 +
include/dt-bindings/firmware/imx/rsrc.h | 84 ++
include/dt-bindings/input/linux-event-codes.h | 3 +-
include/dt-bindings/interconnect/imx8mm.h | 50 +
include/dt-bindings/interconnect/imx8mn.h | 41 +
include/dt-bindings/interconnect/imx8mq.h | 48 +
include/dt-bindings/mailbox/qcom-ipcc.h | 33 +
include/dt-bindings/phy/phy.h | 1 +
include/dt-bindings/pinctrl/pads-imx8dxl.h | 639 +++++++++
include/dt-bindings/pinctrl/rockchip.h | 11 -
include/dt-bindings/power/marvell,mmp2.h | 11 +
include/dt-bindings/power/meson-gxbb-power.h | 13 +
include/dt-bindings/power/meson8-power.h | 13 +
include/dt-bindings/power/qcom-rpmpd.h | 12 +
include/dt-bindings/power/r8a7742-sysc.h | 29 +
.../reset/amlogic,meson-gxbb-reset.h | 2 +-
include/dt-bindings/reset/bt1-ccu.h | 25 +
include/dt-bindings/reset/imx8mp-reset.h | 50 +
include/dt-bindings/reset/imx8mq-reset.h | 56 +-
include/dt-bindings/reset/qcom,gcc-msm8939.h | 110 ++
include/dt-bindings/reset/realtek,rtd1195.h | 74 ++
include/dt-bindings/reset/realtek,rtd1295.h | 3 +
src/arm/am335x-baltos.dtsi | 2 +-
src/arm/am335x-boneblack-common.dtsi | 1 +
src/arm/am335x-boneblack-wireless.dts | 1 -
src/arm/am335x-boneblue.dts | 1 -
src/arm/am335x-bonegreen-wireless.dts | 1 -
src/arm/am335x-evm.dts | 3 +-
src/arm/am335x-evmsk.dts | 2 +-
src/arm/am335x-guardian.dts | 1 +
src/arm/am335x-lxm.dts | 2 +-
src/arm/am335x-moxa-uc-2100-common.dtsi | 2 +-
src/arm/am335x-moxa-uc-8100-me-t.dts | 2 +-
src/arm/am335x-pepper.dts | 4 +-
src/arm/am335x-phycore-som.dtsi | 2 +-
src/arm/am335x-pocketbeagle.dts | 1 -
src/arm/am33xx-l4.dtsi | 12 +-
src/arm/am33xx.dtsi | 27 +-
src/arm/am3517-evm.dts | 1 +
src/arm/am3517.dtsi | 24 +-
src/arm/am4372.dtsi | 23 +-
src/arm/am437x-cm-t43.dts | 2 +-
src/arm/am437x-gp-evm.dts | 20 +-
src/arm/am437x-l4.dtsi | 26 +-
src/arm/am437x-sk-evm.dts | 18 +-
src/arm/am43x-epos-evm.dts | 16 -
src/arm/am571x-idk.dts | 48 +-
src/arm/am5729-beagleboneai.dts | 731 ++++++++++
src/arm/am572x-idk-common.dtsi | 63 +-
src/arm/am57xx-beagle-x15-common.dtsi | 63 +-
src/arm/am57xx-idk-common.dtsi | 58 +
src/arm/armada-370-xp.dtsi | 2 -
src/arm/armada-375.dtsi | 2 -
src/arm/armada-38x.dtsi | 5 +-
src/arm/armada-39x.dtsi | 4 -
src/arm/aspeed-ast2600-evb.dts | 4 +
src/arm/aspeed-bmc-facebook-tiogapass.dts | 78 +-
src/arm/aspeed-bmc-facebook-yosemitev2.dts | 231 ++++
src/arm/aspeed-bmc-ibm-rainier.dts | 202 ++-
src/arm/aspeed-bmc-opp-mihawk.dts | 310 ++++-
src/arm/aspeed-bmc-opp-nicole.dts | 326 +++++
src/arm/aspeed-bmc-opp-romulus.dts | 35 +-
src/arm/aspeed-bmc-opp-tacoma.dts | 112 ++
src/arm/aspeed-bmc-opp-witherspoon.dts | 34 +
src/arm/aspeed-bmc-opp-zaius.dts | 37 +-
src/arm/aspeed-g4.dtsi | 10 +
src/arm/aspeed-g5.dtsi | 43 +-
src/arm/aspeed-g6.dtsi | 64 +-
src/arm/at91-dvk_su60_somc.dtsi | 2 +-
src/arm/at91-kizbox3-hs.dts | 4 +-
src/arm/at91-kizbox3_common.dtsi | 48 +-
src/arm/at91-sam9x60ek.dts | 23 +
src/arm/at91-sama5d27_som1.dtsi | 54 +
src/arm/at91-sama5d27_som1_ek.dts | 64 +-
src/arm/at91-sama5d27_wlsom1.dtsi | 16 +-
src/arm/at91-sama5d27_wlsom1_ek.dts | 12 -
src/arm/at91-sama5d2_icp.dts | 767 +++++++++++
src/arm/at91-sama5d2_ptc_ek.dts | 25 +-
src/arm/at91-sama5d2_xplained.dts | 118 +-
src/arm/at91-wb50n.dtsi | 4 -
src/arm/at91rm9200.dtsi | 296 +----
src/arm/at91sam9g45.dtsi | 392 +-----
src/arm/at91sam9m10g45ek.dts | 4 +-
src/arm/at91sam9n12.dtsi | 324 +----
src/arm/at91sam9n12ek.dts | 2 +-
src/arm/at91sam9rl.dtsi | 54 -
src/arm/at91sam9x5.dtsi | 54 -
src/arm/bcm-nsp.dtsi | 10 +-
src/arm/bcm2711-rpi-4-b.dts | 13 +-
src/arm/bcm2835-common.dtsi | 1 -
src/arm/bcm2835-rpi-common.dtsi | 12 +
src/arm/bcm2835.dtsi | 1 +
src/arm/bcm2836.dtsi | 1 +
src/arm/bcm2837.dtsi | 1 +
src/arm/bcm47094-luxul-xwc-2000.dts | 1 +
src/arm/bcm958522er.dts | 4 +
src/arm/bcm958525er.dts | 4 +
src/arm/bcm958525xmc.dts | 4 +
src/arm/bcm958622hr.dts | 4 +
src/arm/bcm958623hr.dts | 4 +
src/arm/bcm958625hr.dts | 4 +
src/arm/bcm958625k.dts | 4 +
src/arm/berlin2.dtsi | 6 +-
src/arm/berlin2cd.dtsi | 2 +-
src/arm/berlin2q.dtsi | 6 +-
src/arm/dm814x.dtsi | 74 +-
src/arm/dm816x.dtsi | 78 +-
src/arm/dove.dtsi | 3 +-
src/arm/dra7-evm-common.dtsi | 21 +-
src/arm/dra7-evm.dts | 54 +
src/arm/dra7-ipu-dsp-common.dtsi | 39 +
src/arm/dra7-l4.dtsi | 63 +-
src/arm/dra7.dtsi | 46 +
src/arm/dra71-evm.dts | 42 +
src/arm/dra72-evm-common.dtsi | 18 +-
src/arm/dra72-evm-revc.dts | 42 +
src/arm/dra72-evm.dts | 42 +
src/arm/dra72x.dtsi | 6 +
src/arm/dra74-ipu-dsp-common.dtsi | 18 +
src/arm/dra74x.dtsi | 21 +
src/arm/dra76-evm.dts | 54 +
src/arm/e60k02.dtsi | 2 +
src/arm/exynos3250-monk.dts | 3 +-
src/arm/exynos3250-rinato.dts | 48 +-
src/arm/exynos4210-i9100.dts | 768 +++++++++++
src/arm/exynos4210-origen.dts | 7 +-
src/arm/exynos4210-trats.dts | 41 +-
src/arm/exynos4210-universal_c210.dts | 33 +-
src/arm/exynos4412-galaxy-s3.dtsi | 6 +-
src/arm/exynos4412-midas.dtsi | 17 +-
src/arm/exynos4412-odroid-common.dtsi | 8 +-
src/arm/exynos4412-origen.dts | 14 +-
src/arm/exynos5250-arndale.dts | 13 +-
src/arm/exynos5420-arndale-octa.dts | 2 +-
src/arm/imx50.dtsi | 8 +-
src/arm/imx51.dtsi | 3 +-
src/arm/imx53-cx9020.dts | 25 +-
src/arm/imx53.dtsi | 3 +-
src/arm/imx6dl-colibri-v1_1-eval-v3.dts | 31 +
src/arm/imx6q-dhcom-pdk2.dts | 115 +-
src/arm/imx6qdl-colibri-v1_1-uhs.dtsi | 44 +
src/arm/imx6qdl-colibri.dtsi | 11 +-
src/arm/imx6qdl-gw551x.dtsi | 2 +-
src/arm/imx6qdl-gw552x.dtsi | 14 +
src/arm/imx6qdl-gw560x.dtsi | 31 +
src/arm/imx6qdl-gw5904.dtsi | 31 +
src/arm/imx6qdl-gw5910.dtsi | 35 +-
src/arm/imx6qdl-icore.dtsi | 3 +-
src/arm/imx6qdl-sabresd.dtsi | 1 +
src/arm/imx6qdl-sr-som.dtsi | 11 +
src/arm/imx6qdl.dtsi | 15 +-
src/arm/imx6sl.dtsi | 13 +-
src/arm/imx6sx-sabreauto.dts | 2 +-
src/arm/imx6sx-sdb.dtsi | 2 +-
src/arm/imx6sx.dtsi | 4 +-
src/arm/imx6ul-kontron-n6x1x-s.dtsi | 13 -
src/arm/imx6ul-kontron-n6x1x-som-common.dtsi | 13 +
src/arm/imx6ul.dtsi | 4 +-
src/arm/imx7-tqma7.dtsi | 2 +-
src/arm/imx7d-cl-som-imx7.dts | 4 +
src/arm/imx7d-colibri.dtsi | 4 +
src/arm/imx7d-nitrogen7.dts | 4 +
src/arm/imx7d-pinfunc.h | 2 +-
src/arm/imx7d-sdb.dts | 4 +
src/arm/imx7d-tqma7.dtsi | 4 +
src/arm/imx7d-zii-rmu2.dts | 2 +-
src/arm/imx7d-zii-rpu2.dts | 2 +-
src/arm/imx7d.dtsi | 1 +
src/arm/imx7s.dtsi | 3 +-
src/arm/integratorap-im-pd1.dts | 270 ++++
src/arm/integratorap.dts | 53 +-
src/arm/keystone-k2e.dtsi | 4 +-
src/arm/keystone-k2g-evm.dts | 103 +-
src/arm/keystone-k2g.dtsi | 26 +-
src/arm/keystone-k2hk.dtsi | 4 +-
src/arm/keystone-k2l.dtsi | 4 +-
src/arm/kirkwood-l-50.dts | 438 ++++++
src/arm/kirkwood-netgear_readynas_nv+_v2.dts | 14 +
src/arm/kirkwood.dtsi | 2 +-
src/arm/logicpd-torpedo-baseboard.dtsi | 1 +
src/arm/ls1021a-twr.dts | 14 +
src/arm/meson.dtsi | 5 +-
src/arm/meson8b-odroidc1.dts | 3 +-
src/arm/meson8b.dtsi | 5 +-
src/arm/meson8m2-mxiii-plus.dts | 4 +-
src/arm/meson8m2.dtsi | 13 +-
src/arm/mmp2.dtsi | 2 +-
src/arm/mmp3.dtsi | 26 +-
src/arm/motorola-cpcap-mapphone.dtsi | 4 +-
src/arm/mt2701-evb.dts | 21 +
src/arm/mt2701.dtsi | 33 +
src/arm/mt7623.dtsi | 25 +
src/arm/mt7623n-rfb-emmc.dts | 1 +
src/arm/omap2.dtsi | 31 +-
src/arm/omap2420.dtsi | 68 +-
src/arm/omap2430.dtsi | 68 +-
src/arm/omap3-beagle.dts | 33 +
src/arm/omap3-devkit8000.dts | 33 +
src/arm/omap3-gta04.dtsi | 1 +
src/arm/omap3-n900.dts | 12 +-
src/arm/omap3.dtsi | 134 +-
src/arm/omap4-duovero-parlor.dts | 2 +-
src/arm/omap4-l4.dtsi | 4 +-
src/arm/omap4.dtsi | 10 +
src/arm/omap5-l4.dtsi | 35 +-
src/arm/omap5.dtsi | 96 ++
src/arm/pxa168.dtsi | 8 +-
src/arm/pxa3xx.dtsi | 2 +-
src/arm/pxa910.dtsi | 4 +-
src/arm/qcom-ipq4019.dtsi | 29 +
src/arm/qcom-ipq8064.dtsi | 6 +
src/arm/qcom-msm8974-samsung-klte.dts | 405 +++++-
src/arm/qcom-msm8974.dtsi | 11 +
src/arm/r8a7740.dtsi | 2 +-
src/arm/r8a7742-iwg21d-q7.dts | 37 +
src/arm/r8a7742-iwg21m.dtsi | 53 +
src/arm/r8a7742.dtsi | 648 +++++++++
src/arm/r8a7743.dtsi | 12 +-
src/arm/r8a7744.dtsi | 12 +-
src/arm/r8a7745.dtsi | 12 +-
src/arm/r8a7790.dtsi | 12 +-
src/arm/r8a7791.dtsi | 95 +-
src/arm/r8a7793.dtsi | 14 +-
src/arm/r8a7794.dtsi | 12 +-
src/arm/rk3036-kylin.dts | 2 +-
src/arm/rk3066a-mk808.dts | 2 +-
src/arm/rk3188-radxarock.dts | 6 +-
src/arm/rk3229-xms6.dts | 19 +-
src/arm/rk322x.dtsi | 10 +
src/arm/rk3288-firefly-reload.dts | 12 +-
src/arm/rk3288-firefly.dtsi | 12 +-
src/arm/rk3288-miqi.dts | 2 +-
src/arm/rk3288-phycore-som.dtsi | 6 +-
src/arm/rk3288-rock2-square.dts | 4 +-
src/arm/rk3288-tinker.dtsi | 6 +-
src/arm/rk3288.dtsi | 1 -
src/arm/rtd1195-horseradish.dts | 32 +
src/arm/rtd1195-mele-x1000.dts | 32 +
src/arm/rtd1195.dtsi | 217 +++
src/arm/s5pv210-aries.dtsi | 359 ++++-
src/arm/s5pv210-fascinate4g.dts | 249 ++++
src/arm/s5pv210-galaxys.dts | 292 ++++
src/arm/s5pv210-pinctrl.dtsi | 9 +-
src/arm/s5pv210.dtsi | 23 +-
src/arm/sama5d2.dtsi | 415 ++++--
src/arm/sama5d3.dtsi | 537 +-------
src/arm/sama5d3_can.dtsi | 20 +-
src/arm/sama5d3_emac.dtsi | 8 +-
src/arm/sama5d3_gmac.dtsi | 11 +-
src/arm/sama5d3_lcd.dtsi | 19 +-
src/arm/sama5d3_mci2.dtsi | 11 +-
src/arm/sama5d3_tcb1.dtsi | 12 +-
src/arm/sama5d3_uart.dtsi | 20 +-
src/arm/sama5d3xmb.dtsi | 6 +-
src/arm/sama5d3xmb_cmp.dtsi | 6 +-
src/arm/sama5d4.dtsi | 126 +-
src/arm/sh73a0.dtsi | 2 +-
src/arm/socfpga.dtsi | 18 +-
src/arm/socfpga_arria10.dtsi | 2 +-
src/arm/ste-ux500-samsung-golden.dts | 65 +
src/arm/ste-ux500-samsung-skomer.dts | 39 +-
src/arm/stih407-family.dtsi | 14 -
src/arm/stih418.dtsi | 8 +-
src/arm/stm32f429.dtsi | 4 +-
src/arm/stm32h743.dtsi | 4 +-
src/arm/stm32mp15-pinctrl.dtsi | 666 +++++++++-
src/arm/stm32mp151.dtsi | 37 +-
src/arm/stm32mp157.dtsi | 8 +-
src/arm/stm32mp157a-avenger96.dts | 314 +----
src/arm/stm32mp157a-dhcor-avenger96.dts | 38 +
src/arm/stm32mp157a-iot-box.dts | 68 +
src/arm/stm32mp157a-stinger96.dts | 12 +
src/arm/stm32mp157a-stinger96.dtsi | 342 +++++
src/arm/stm32mp157c-dhcom-pdk2.dts | 265 +---
src/arm/stm32mp157c-dk2.dts | 8 -
src/arm/stm32mp157c-ed1.dts | 7 +-
src/arm/stm32mp157c-ev1.dts | 14 +-
src/arm/stm32mp157c-lxa-mc1.dts | 252 ++++
src/arm/stm32mp15xx-dhcom-pdk2.dtsi | 337 +++++
...om-som.dtsi => stm32mp15xx-dhcom-som.dtsi} | 9 +-
src/arm/stm32mp15xx-dhcor-avenger96.dtsi | 401 ++++++
src/arm/stm32mp15xx-dhcor-io1v8.dtsi | 23 +
src/arm/stm32mp15xx-dhcor-som.dtsi | 209 +++
src/arm/stm32mp15xx-dkx.dtsi | 20 +-
src/arm/stm32mp15xx-osd32.dtsi | 230 ++++
src/arm/sun4i-a10.dtsi | 2 +-
src/arm/sun5i.dtsi | 2 +-
src/arm/sun7i-a20-olinuxino-lime-emmc.dts | 32 +
src/arm/sun7i-a20.dtsi | 2 +-
src/arm/sun8i-a83t.dtsi | 10 +
src/arm/sun8i-h2-plus-bananapi-m2-zero.dts | 2 +-
src/arm/sun8i-h3.dtsi | 24 +-
src/arm/sunxi-h3-h5.dtsi | 10 +
src/arm/tegra114-dalmore.dts | 3 +-
src/arm/tegra124-venice2.dts | 2 +-
src/arm/tegra20-colibri-eval-v3.dts | 2 +-
src/arm/tegra20-colibri-iris.dts | 2 +-
src/arm/tegra20-harmony.dts | 2 +-
src/arm/tegra20-medcom-wide.dts | 2 +-
src/arm/tegra20-paz00.dts | 2 +-
src/arm/tegra20-seaboard.dts | 2 +-
src/arm/tegra20-ventana.dts | 2 +-
src/arm/tegra30-apalis-eval.dts | 2 +-
src/arm/tegra30-apalis-v1.1-eval.dts | 2 +-
src/arm/tegra30-beaver.dts | 40 +-
src/arm/tegra30-cardhu.dtsi | 2 +-
src/arm/tegra30-colibri-eval-v3.dts | 2 +-
src/arm/uniphier-ld4.dtsi | 2 +
src/arm/uniphier-ld6b-ref.dts | 1 +
src/arm/uniphier-pro4-ace.dts | 1 +
src/arm/uniphier-pro4-ref.dts | 1 +
src/arm/uniphier-pro4-sanji.dts | 1 +
src/arm/uniphier-pro4.dtsi | 10 +
src/arm/uniphier-pro5.dtsi | 12 +
src/arm/uniphier-pxs2-gentil.dts | 1 +
src/arm/uniphier-pxs2-vodka.dts | 1 +
src/arm/uniphier-pxs2.dtsi | 12 +
src/arm/uniphier-sld8.dtsi | 2 +
src/arm/vexpress-v2m-rs1.dtsi | 304 ++---
src/arm64/allwinner/sun50i-a64-olinuxino.dts | 9 +
src/arm64/allwinner/sun50i-a64.dtsi | 12 +
src/arm64/allwinner/sun50i-h6-beelink-gs1.dts | 9 +-
src/arm64/allwinner/sun50i-h6-cpu-opp.dtsi | 117 ++
src/arm64/allwinner/sun50i-h6-orangepi-3.dts | 3 +
.../allwinner/sun50i-h6-orangepi-lite2.dts | 65 +
src/arm64/allwinner/sun50i-h6-orangepi.dtsi | 17 +-
src/arm64/allwinner/sun50i-h6-pine-h64.dts | 43 +-
src/arm64/allwinner/sun50i-h6-tanix-tx6.dts | 13 +
src/arm64/allwinner/sun50i-h6.dtsi | 61 +
src/arm64/altera/socfpga_stratix10.dtsi | 8 +-
src/arm64/altera/socfpga_stratix10_socdk.dts | 1 +
.../altera/socfpga_stratix10_socdk_nand.dts | 7 +-
src/arm64/amlogic/meson-axg.dtsi | 6 +-
src/arm64/amlogic/meson-g12-common.dtsi | 11 +
src/arm64/amlogic/meson-g12.dtsi | 32 +-
src/arm64/amlogic/meson-g12b-gtking-pro.dts | 125 ++
src/arm64/amlogic/meson-g12b-gtking.dts | 145 ++
src/arm64/amlogic/meson-g12b-khadas-vim3.dtsi | 18 +-
src/arm64/amlogic/meson-g12b-s922x.dtsi | 15 +
src/arm64/amlogic/meson-g12b-ugoos-am6.dts | 377 +-----
src/arm64/amlogic/meson-g12b-w400.dtsi | 423 ++++++
src/arm64/amlogic/meson-g12b.dtsi | 22 +
src/arm64/amlogic/meson-gx-libretech-pc.dtsi | 78 +-
src/arm64/amlogic/meson-gx-p23x-q20x.dtsi | 98 +-
src/arm64/amlogic/meson-gx.dtsi | 23 +-
src/arm64/amlogic/meson-gxbb-kii-pro.dts | 2 +-
src/arm64/amlogic/meson-gxbb-nanopi-k2.dts | 2 +-
src/arm64/amlogic/meson-gxbb-nexbox-a95x.dts | 2 +-
src/arm64/amlogic/meson-gxbb-odroidc2.dts | 2 +-
src/arm64/amlogic/meson-gxbb-vega-s95.dtsi | 2 +-
src/arm64/amlogic/meson-gxbb-wetek-play2.dts | 4 +-
src/arm64/amlogic/meson-gxbb-wetek.dtsi | 6 +-
src/arm64/amlogic/meson-gxbb.dtsi | 23 +
.../amlogic/meson-gxl-s805x-libretech-ac.dts | 75 +-
src/arm64/amlogic/meson-gxl-s805x-p241.dts | 5 +-
src/arm64/amlogic/meson-gxl-s805x.dtsi | 24 +
.../amlogic/meson-gxl-s905d-phicomm-n1.dts | 4 +
.../amlogic/meson-gxl-s905d-sml5442tw.dts | 80 ++
src/arm64/amlogic/meson-gxl-s905w-p281.dts | 4 +
.../amlogic/meson-gxl-s905w-tx3-mini.dts | 4 +
.../amlogic/meson-gxl-s905x-khadas-vim.dts | 4 +
.../amlogic/meson-gxl-s905x-libretech-cc.dts | 77 +-
.../amlogic/meson-gxl-s905x-nexbox-a95x.dts | 3 +-
src/arm64/amlogic/meson-gxl-s905x-p212.dtsi | 3 +-
src/arm64/amlogic/meson-gxl.dtsi | 84 +-
src/arm64/amlogic/meson-gxm-khadas-vim2.dts | 3 +-
src/arm64/amlogic/meson-gxm-nexbox-a1.dts | 3 +-
src/arm64/amlogic/meson-gxm-rbox-pro.dts | 4 +-
src/arm64/amlogic/meson-gxm-vega-s96.dts | 4 +
src/arm64/amlogic/meson-gxm.dtsi | 7 +-
src/arm64/amlogic/meson-khadas-vim3.dtsi | 4 +-
src/arm64/amlogic/meson-sm1-odroid-c4.dts | 402 ++++++
src/arm64/amlogic/meson-sm1-sei610.dts | 2 +-
src/arm64/amlogic/meson-sm1.dtsi | 24 +
src/arm64/arm/foundation-v8-gicv2.dtsi | 4 +-
src/arm64/arm/foundation-v8-gicv3.dtsi | 11 +-
src/arm64/arm/foundation-v8.dtsi | 140 +-
src/arm64/arm/fvp-base-revc.dts | 10 +-
src/arm64/arm/juno-base.dtsi | 78 +-
src/arm64/arm/juno-motherboard.dtsi | 174 +--
src/arm64/arm/rtsm_ve-aemv8a.dts | 2 +-
src/arm64/arm/rtsm_ve-motherboard-rs2.dtsi | 4 +-
src/arm64/arm/rtsm_ve-motherboard.dtsi | 152 +--
src/arm64/arm/vexpress-v2m-rs1.dtsi | 304 ++---
src/arm64/freescale/fsl-ls1012a-frdm.dts | 15 +
src/arm64/freescale/fsl-ls1012a-frwy.dts | 15 +
src/arm64/freescale/fsl-ls1012a-qds.dts | 15 +
src/arm64/freescale/fsl-ls1012a-rdb.dts | 15 +
src/arm64/freescale/fsl-ls1012a.dtsi | 13 +
.../fsl-ls1028a-kontron-sl28-var2.dts | 4 +-
.../freescale/fsl-ls1028a-kontron-sl28.dts | 5 +
src/arm64/freescale/fsl-ls1028a.dtsi | 6 +
src/arm64/freescale/fsl-ls1043a-rdb.dts | 33 +
src/arm64/freescale/fsl-ls1043a.dtsi | 65 +
src/arm64/freescale/fsl-lx2160a.dtsi | 130 +-
.../freescale/imx8mm-beacon-baseboard.dtsi | 285 ++++
src/arm64/freescale/imx8mm-beacon-kit.dts | 19 +
src/arm64/freescale/imx8mm-beacon-som.dtsi | 410 ++++++
src/arm64/freescale/imx8mm-evk.dts | 16 +-
src/arm64/freescale/imx8mm.dtsi | 14 +-
src/arm64/freescale/imx8mn-ddr4-evk.dts | 16 +-
src/arm64/freescale/imx8mn.dtsi | 12 +-
src/arm64/freescale/imx8mp.dtsi | 88 +-
src/arm64/freescale/imx8mq-librem5-devkit.dts | 4 +-
src/arm64/freescale/imx8mq.dtsi | 10 +-
src/arm64/freescale/imx8qxp-mek.dts | 95 +-
src/arm64/freescale/imx8qxp.dtsi | 18 +-
src/arm64/freescale/qoriq-fman3-0.dtsi | 1 +
src/arm64/hisilicon/hi3660.dtsi | 4 +-
src/arm64/hisilicon/hi6220-coresight.dtsi | 130 +-
src/arm64/hisilicon/hikey960-pinctrl.dtsi | 6 +-
src/arm64/intel/socfpga_agilex.dtsi | 4 +-
src/arm64/intel/socfpga_agilex_socdk.dts | 1 +
src/arm64/marvell/armada-3720-db.dts | 3 +
.../marvell/armada-3720-espressobin.dtsi | 2 +-
src/arm64/marvell/armada-3720-turris-mox.dts | 10 +-
src/arm64/marvell/armada-3720-uDPU.dts | 22 +-
src/arm64/marvell/armada-37xx.dtsi | 4 +-
.../marvell/armada-8040-clearfog-gt-8k.dts | 7 +-
.../marvell/armada-8040-mcbin-singleshot.dts | 4 +-
src/arm64/marvell/armada-8040-mcbin.dts | 4 +-
src/arm64/marvell/armada-ap80x.dtsi | 1 -
src/arm64/mediatek/mt2712-evb.dts | 74 ++
src/arm64/mediatek/mt2712e.dtsi | 158 ++-
src/arm64/mediatek/mt6358.dtsi | 358 +++++
src/arm64/mediatek/mt6797-x20-dev.dts | 49 +
src/arm64/mediatek/mt6797.dtsi | 231 +++-
.../mediatek/mt7622-bananapi-bpi-r64.dts | 4 +
src/arm64/mediatek/mt7622-rfb1.dts | 4 +
src/arm64/mediatek/mt7622.dtsi | 11 +
src/arm64/mediatek/mt8173-elm-hana-rev7.dts | 27 +
src/arm64/mediatek/mt8173-elm-hana.dts | 14 +
src/arm64/mediatek/mt8173-elm-hana.dtsi | 70 +
src/arm64/mediatek/mt8173-elm.dts | 14 +
src/arm64/mediatek/mt8173-elm.dtsi | 1173 +++++++++++++++++
src/arm64/mediatek/mt8173.dtsi | 80 +-
src/arm64/mediatek/mt8183-evb.dts | 147 +++
src/arm64/mediatek/mt8183.dtsi | 50 +-
src/arm64/mediatek/mt8516.dtsi | 17 +
src/arm64/mediatek/pumpkin-common.dtsi | 34 +
src/arm64/nvidia/tegra132-norrin.dts | 2 +-
src/arm64/nvidia/tegra186-p3310.dtsi | 3 +-
src/arm64/nvidia/tegra194-p2888.dtsi | 5 +-
src/arm64/nvidia/tegra194.dtsi | 30 +-
src/arm64/nvidia/tegra210-p2180.dtsi | 3 +-
src/arm64/nvidia/tegra210-p2597.dtsi | 10 +
src/arm64/nvidia/tegra210-p3450-0000.dts | 7 +-
src/arm64/nvidia/tegra210.dtsi | 89 +-
src/arm64/qcom/apq8016-sbc-pmic-pins.dtsi | 74 --
src/arm64/qcom/apq8016-sbc-soc-pins.dtsi | 89 --
src/arm64/qcom/apq8016-sbc.dtsi | 257 +++-
src/arm64/qcom/apq8096-db820c.dtsi | 53 +-
src/arm64/qcom/ipq8074-hk01.dts | 108 +-
src/arm64/qcom/ipq8074.dtsi | 502 +++----
src/arm64/qcom/msm8916-longcheer-l8150.dts | 25 +-
src/arm64/qcom/msm8916-pins.dtsi | 221 ++--
.../qcom/msm8916-samsung-a2015-common.dtsi | 98 +-
src/arm64/qcom/msm8916-samsung-a3u-eur.dts | 54 +
src/arm64/qcom/msm8916-samsung-a5u-eur.dts | 35 +
src/arm64/qcom/msm8916.dtsi | 228 +++-
src/arm64/qcom/msm8996.dtsi | 87 +-
src/arm64/qcom/msm8998.dtsi | 38 +-
src/arm64/qcom/pm8150.dtsi | 14 +-
src/arm64/qcom/pm8150b.dtsi | 14 +-
src/arm64/qcom/pm8150l.dtsi | 14 +-
src/arm64/qcom/pmi8994.dtsi | 6 +
src/arm64/qcom/qcs404-evb.dtsi | 85 +-
src/arm64/qcom/qcs404.dtsi | 100 ++
src/arm64/qcom/sc7180-idp.dts | 66 +-
src/arm64/qcom/sc7180.dtsi | 963 ++++++++++++--
src/arm64/qcom/sdm660-xiaomi-lavender.dts | 46 +
src/arm64/qcom/sdm660.dtsi | 372 ++++++
src/arm64/qcom/sdm845-cheza.dtsi | 7 +
src/arm64/qcom/sdm845-db845c.dts | 210 +++
src/arm64/qcom/sdm845-mtp.dts | 2 +-
src/arm64/qcom/sdm845.dtsi | 106 +-
src/arm64/qcom/sdm850-lenovo-yoga-c630.dts | 13 +
src/arm64/qcom/sm8250-mtp.dts | 351 +++++
src/arm64/qcom/sm8250.dtsi | 126 +-
src/arm64/realtek/rtd1293-ds418j.dts | 6 +-
src/arm64/realtek/rtd1293.dtsi | 12 +-
src/arm64/realtek/rtd1295-mele-v9.dts | 6 +-
src/arm64/realtek/rtd1295-probox2-ava.dts | 6 +-
src/arm64/realtek/rtd1295-xnano-x5.dts | 30 +
src/arm64/realtek/rtd1295-zidoo-x9s.dts | 4 +-
src/arm64/realtek/rtd1295.dtsi | 21 +-
src/arm64/realtek/rtd1296-ds418.dts | 4 +-
src/arm64/realtek/rtd1296.dtsi | 8 +-
src/arm64/realtek/rtd129x.dtsi | 209 ++-
src/arm64/realtek/rtd1395-bpi-m4.dts | 30 +
src/arm64/realtek/rtd1395-lionskin.dts | 36 +
src/arm64/realtek/rtd1395.dtsi | 65 +
src/arm64/realtek/rtd139x.dtsi | 193 +++
src/arm64/realtek/rtd1619-mjolnir.dts | 44 +
src/arm64/realtek/rtd1619.dtsi | 12 +
src/arm64/realtek/rtd16xx.dtsi | 229 ++++
.../aistarvision-mipi-adapter-2.1.dtsi | 94 ++
src/arm64/renesas/r8a774a1.dtsi | 18 +-
src/arm64/renesas/r8a774b1.dtsi | 18 +-
src/arm64/renesas/r8a774c0-ek874-mipi-2.1.dts | 72 +
src/arm64/renesas/r8a774c0.dtsi | 18 +-
src/arm64/renesas/r8a77950.dtsi | 14 +-
src/arm64/renesas/r8a77951.dtsi | 34 +-
src/arm64/renesas/r8a77960.dtsi | 22 +-
src/arm64/renesas/r8a77961.dtsi | 403 +++++-
src/arm64/renesas/r8a77965.dtsi | 20 +-
src/arm64/renesas/r8a77970.dtsi | 10 +-
src/arm64/renesas/r8a77980.dtsi | 16 +-
src/arm64/renesas/r8a77990.dtsi | 20 +-
src/arm64/renesas/r8a77995.dtsi | 20 +-
src/arm64/rockchip/px30.dtsi | 3 +
src/arm64/rockchip/rk3308-roc-cc.dts | 7 +-
src/arm64/rockchip/rk3326-odroid-go2.dts | 557 ++++++++
src/arm64/rockchip/rk3326.dtsi | 15 +
src/arm64/rockchip/rk3328-a1.dts | 2 +-
src/arm64/rockchip/rk3328-roc-cc.dts | 4 +-
src/arm64/rockchip/rk3328-rock64.dts | 4 +-
src/arm64/rockchip/rk3328.dtsi | 2 +-
src/arm64/rockchip/rk3368-geekbox.dts | 4 +-
src/arm64/rockchip/rk3368-orion-r68-meta.dts | 4 +-
src/arm64/rockchip/rk3368-r88.dts | 2 +-
src/arm64/rockchip/rk3399-ficus.dts | 29 +-
src/arm64/rockchip/rk3399-firefly.dts | 10 +-
src/arm64/rockchip/rk3399-hugsun-x99.dts | 7 +-
src/arm64/rockchip/rk3399-nanopi4.dtsi | 4 +-
src/arm64/rockchip/rk3399-orangepi.dts | 4 +-
src/arm64/rockchip/rk3399-pinebook-pro.dts | 11 +-
src/arm64/rockchip/rk3399-rock960.dts | 29 +-
src/arm64/rockchip/rk3399-rockpro64.dtsi | 27 +
src/arm64/rockchip/rk3399.dtsi | 34 +-
src/arm64/socionext/uniphier-ld11-global.dts | 1 +
src/arm64/socionext/uniphier-ld11-ref.dts | 1 +
src/arm64/socionext/uniphier-ld11.dtsi | 12 +
src/arm64/socionext/uniphier-ld20-akebi96.dts | 189 +++
src/arm64/socionext/uniphier-ld20-global.dts | 1 +
src/arm64/socionext/uniphier-ld20-ref.dts | 1 +
src/arm64/socionext/uniphier-ld20.dtsi | 16 +
src/arm64/socionext/uniphier-pxs3-ref.dts | 18 +
src/arm64/socionext/uniphier-pxs3.dtsi | 12 +
src/arm64/sprd/sc9863a.dtsi | 66 +
src/arm64/sprd/sharkl3.dtsi | 164 +++
src/arm64/ti/k3-am65-main.dtsi | 126 ++
src/arm64/ti/k3-am65-mcu.dtsi | 21 +
src/arm64/ti/k3-am65-wakeup.dtsi | 11 +
src/arm64/ti/k3-am654-industrial-thermal.dtsi | 45 +
src/arm64/ti/k3-j721e-common-proc-board.dts | 20 +
src/arm64/ti/k3-j721e-main.dtsi | 87 ++
src/arm64/ti/k3-j721e-mcu-wakeup.dtsi | 11 +
src/arm64/xilinx/zynqmp.dtsi | 6 +-
src/mips/ingenic/ci20.dts | 3 +
src/mips/ingenic/gcw0.dts | 507 ++++++-
src/mips/ingenic/gcw0_proto.dts | 13 +
src/mips/ingenic/jz4740.dtsi | 33 +-
src/mips/ingenic/jz4770.dtsi | 227 +++-
src/mips/ingenic/jz4780.dtsi | 65 +-
src/mips/ingenic/x1000.dtsi | 9 +-
src/mips/loongson/rs780e-pch.dtsi | 17 +
src/mips/mscc/ocelot.dtsi | 2 +-
src/mips/qca/ar9331.dtsi | 2 +-
src/mips/qca/ar9331_dpt_module.dts | 6 +-
src/powerpc/ep405.dts | 230 ----
src/powerpc/pcm032.dts | 4 +-
src/powerpc/virtex440-ml507.dts | 406 ------
src/powerpc/virtex440-ml510.dts | 466 -------
src/powerpc/walnut.dts | 246 ----
1396 files changed, 55802 insertions(+), 18784 deletions(-)
rename Bindings/{ABI.txt => ABI.rst} (94%)
create mode 100644 Bindings/arm/calxeda/hb-sregs.yaml
delete mode 100644 Bindings/arm/calxeda/l2ecc.txt
create mode 100644 Bindings/arm/calxeda/l2ecc.yaml
create mode 100644 Bindings/arm/mediatek/mediatek,mipi0a.txt
delete mode 100644 Bindings/arm/mediatek/mediatek,pericfg.txt
create mode 100644 Bindings/arm/mediatek/mediatek,pericfg.yaml
create mode 100644 Bindings/arm/mediatek/mediatek,vcodecsys.txt
delete mode 100644 Bindings/ata/sata_highbank.txt
create mode 100644 Bindings/ata/sata_highbank.yaml
delete mode 100644 Bindings/auxdisplay/hit,hd44780.txt
create mode 100644 Bindings/auxdisplay/hit,hd44780.yaml
create mode 100644 Bindings/bus/arm,integrator-ap-lm.yaml
create mode 100644 Bindings/bus/baikal,bt1-apb.yaml
create mode 100644 Bindings/bus/baikal,bt1-axi.yaml
create mode 100644 Bindings/clock/baikal,bt1-ccu-div.yaml
create mode 100644 Bindings/clock/baikal,bt1-ccu-pll.yaml
delete mode 100644 Bindings/clock/calxeda.txt
create mode 100644 Bindings/clock/calxeda.yaml
delete mode 100644 Bindings/clock/cirrus,lochnagar.txt
create mode 100644 Bindings/clock/cirrus,lochnagar.yaml
delete mode 100644 Bindings/clock/imx1-clock.txt
create mode 100644 Bindings/clock/imx1-clock.yaml
delete mode 100644 Bindings/clock/imx21-clock.txt
create mode 100644 Bindings/clock/imx21-clock.yaml
delete mode 100644 Bindings/clock/imx23-clock.txt
create mode 100644 Bindings/clock/imx23-clock.yaml
delete mode 100644 Bindings/clock/imx25-clock.txt
create mode 100644 Bindings/clock/imx25-clock.yaml
delete mode 100644 Bindings/clock/imx27-clock.txt
create mode 100644 Bindings/clock/imx27-clock.yaml
delete mode 100644 Bindings/clock/imx28-clock.txt
create mode 100644 Bindings/clock/imx28-clock.yaml
delete mode 100644 Bindings/clock/imx31-clock.txt
create mode 100644 Bindings/clock/imx31-clock.yaml
delete mode 100644 Bindings/clock/imx35-clock.txt
create mode 100644 Bindings/clock/imx35-clock.yaml
delete mode 100644 Bindings/clock/imx5-clock.txt
create mode 100644 Bindings/clock/imx5-clock.yaml
delete mode 100644 Bindings/clock/imx6q-clock.txt
create mode 100644 Bindings/clock/imx6q-clock.yaml
delete mode 100644 Bindings/clock/imx6sl-clock.txt
create mode 100644 Bindings/clock/imx6sl-clock.yaml
delete mode 100644 Bindings/clock/imx6sll-clock.txt
create mode 100644 Bindings/clock/imx6sll-clock.yaml
delete mode 100644 Bindings/clock/imx6sx-clock.txt
create mode 100644 Bindings/clock/imx6sx-clock.yaml
delete mode 100644 Bindings/clock/imx6ul-clock.txt
create mode 100644 Bindings/clock/imx6ul-clock.yaml
delete mode 100644 Bindings/clock/imx7d-clock.txt
create mode 100644 Bindings/clock/imx7d-clock.yaml
delete mode 100644 Bindings/clock/imx8qxp-lpcg.txt
create mode 100644 Bindings/clock/imx8qxp-lpcg.yaml
delete mode 100644 Bindings/clock/ingenic,cgu.txt
create mode 100644 Bindings/clock/ingenic,cgu.yaml
create mode 100644 Bindings/clock/intel,agilex.yaml
create mode 100644 Bindings/clock/intel,cgu-lgm.yaml
create mode 100644 Bindings/clock/marvell,mmp2-audio-clock.yaml
delete mode 100644 Bindings/clock/qcom,a53pll.txt
create mode 100644 Bindings/clock/qcom,a53pll.yaml
create mode 100644 Bindings/clock/renesas,cpg-div6-clock.yaml
delete mode 100644 Bindings/clock/renesas,cpg-div6-clocks.txt
delete mode 100644 Bindings/clock/renesas,cpg-mstp-clocks.txt
create mode 100644 Bindings/clock/renesas,cpg-mstp-clocks.yaml
create mode 100644 Bindings/cpufreq/nvidia,tegra20-cpufreq.txt
delete mode 100644 Bindings/display/bridge/adi,adv7123.txt
create mode 100644 Bindings/display/bridge/analogix,anx7814.yaml
delete mode 100644 Bindings/display/bridge/anx7814.txt
create mode 100644 Bindings/display/bridge/chrontel,ch7033.yaml
delete mode 100644 Bindings/display/bridge/dumb-vga-dac.txt
delete mode 100644 Bindings/display/bridge/dw_mipi_dsi.txt
create mode 100644 Bindings/display/bridge/ite,it6505.yaml
create mode 100644 Bindings/display/bridge/nwl-dsi.yaml
create mode 100644 Bindings/display/bridge/simple-bridge.yaml
create mode 100644 Bindings/display/bridge/snps,dw-mipi-dsi.yaml
delete mode 100644 Bindings/display/bridge/thine,thc63lvd1024.txt
create mode 100644 Bindings/display/bridge/thine,thc63lvd1024.yaml
delete mode 100644 Bindings/display/bridge/ti,ths813x.txt
delete mode 100644 Bindings/display/panel/arm,versatile-tft-panel.txt
create mode 100644 Bindings/display/panel/arm,versatile-tft-panel.yaml
create mode 100644 Bindings/display/panel/asus,z00t-tm5p5-nt35596.yaml
delete mode 100644 Bindings/display/panel/boe,himax8279d.txt
create mode 100644 Bindings/display/panel/boe,himax8279d.yaml
delete mode 100644 Bindings/display/panel/feiyang,fy07024di26a30d.txt
create mode 100644 Bindings/display/panel/feiyang,fy07024di26a30d.yaml
delete mode 100644 Bindings/display/panel/ilitek,ili9322.txt
create mode 100644 Bindings/display/panel/ilitek,ili9322.yaml
delete mode 100644 Bindings/display/panel/ilitek,ili9881c.txt
create mode 100644 Bindings/display/panel/ilitek,ili9881c.yaml
delete mode 100644 Bindings/display/panel/innolux,p097pfg.txt
create mode 100644 Bindings/display/panel/innolux,p097pfg.yaml
delete mode 100644 Bindings/display/panel/innolux,p120zdg-bf1.txt
create mode 100644 Bindings/display/panel/innolux,p120zdg-bf1.yaml
delete mode 100644 Bindings/display/panel/jdi,lt070me05000.txt
create mode 100644 Bindings/display/panel/jdi,lt070me05000.yaml
delete mode 100644 Bindings/display/panel/kingdisplay,kd035g6-54nt.txt
create mode 100644 Bindings/display/panel/kingdisplay,kd035g6-54nt.yaml
delete mode 100644 Bindings/display/panel/kingdisplay,kd097d04.txt
create mode 100644 Bindings/display/panel/leadtek,ltk050h3146w.yaml
delete mode 100644 Bindings/display/panel/lg,acx467akm-7.txt
delete mode 100644 Bindings/display/panel/lg,ld070wx3-sl01.txt
delete mode 100644 Bindings/display/panel/lg,lg4573.txt
create mode 100644 Bindings/display/panel/lg,lg4573.yaml
delete mode 100644 Bindings/display/panel/lg,lh500wx1-sd03.txt
delete mode 100644 Bindings/display/panel/lgphilips,lb035q02.txt
create mode 100644 Bindings/display/panel/lgphilips,lb035q02.yaml
delete mode 100644 Bindings/display/panel/olimex,lcd-olinuxino.txt
create mode 100644 Bindings/display/panel/olimex,lcd-olinuxino.yaml
delete mode 100644 Bindings/display/panel/osddisplays,osd101t2587-53ts.txt
delete mode 100644 Bindings/display/panel/raydium,rm67191.txt
create mode 100644 Bindings/display/panel/raydium,rm67191.yaml
create mode 100644 Bindings/display/panel/samsung,amoled-mipi-dsi.yaml
delete mode 100644 Bindings/display/panel/samsung,ld9040.txt
create mode 100644 Bindings/display/panel/samsung,ld9040.yaml
delete mode 100644 Bindings/display/panel/samsung,s6d16d0.txt
create mode 100644 Bindings/display/panel/samsung,s6d16d0.yaml
delete mode 100644 Bindings/display/panel/samsung,s6e3ha2.txt
delete mode 100644 Bindings/display/panel/samsung,s6e63j0x03.txt
delete mode 100644 Bindings/display/panel/samsung,s6e63m0.txt
create mode 100644 Bindings/display/panel/samsung,s6e63m0.yaml
delete mode 100644 Bindings/display/panel/seiko,43wvf1g.txt
create mode 100644 Bindings/display/panel/seiko,43wvf1g.yaml
delete mode 100644 Bindings/display/panel/sharp,lq150x1lg11.txt
create mode 100644 Bindings/display/panel/sharp,lq150x1lg11.yaml
delete mode 100644 Bindings/display/panel/sharp,ls037v7dw01.txt
create mode 100644 Bindings/display/panel/sharp,ls037v7dw01.yaml
delete mode 100644 Bindings/display/panel/sharp,ls043t1le01.txt
create mode 100644 Bindings/display/panel/sharp,ls043t1le01.yaml
delete mode 100644 Bindings/display/panel/simple-panel.txt
delete mode 100644 Bindings/display/panel/sitronix,st7701.txt
create mode 100644 Bindings/display/panel/sitronix,st7701.yaml
delete mode 100644 Bindings/display/panel/sitronix,st7789v.txt
create mode 100644 Bindings/display/panel/sitronix,st7789v.yaml
delete mode 100644 Bindings/display/panel/sony,acx565akm.txt
create mode 100644 Bindings/display/panel/sony,acx565akm.yaml
delete mode 100644 Bindings/display/panel/startek,startek-kd050c.txt
create mode 100644 Bindings/display/panel/startek,startek-kd050c.yaml
create mode 100644 Bindings/display/panel/tpo,td.yaml
delete mode 100644 Bindings/display/panel/tpo,td028ttec1.txt
delete mode 100644 Bindings/display/panel/tpo,td043mtea1.txt
create mode 100644 Bindings/display/panel/visionox,rm69299.yaml
delete mode 100644 Bindings/display/rockchip/rockchip,rk3066-hdmi.txt
create mode 100644 Bindings/display/rockchip/rockchip,rk3066-hdmi.yaml
delete mode 100644 Bindings/display/rockchip/rockchip-vop.txt
create mode 100644 Bindings/display/rockchip/rockchip-vop.yaml
create mode 100644 Bindings/dma/ingenic,dma.yaml
delete mode 100644 Bindings/dma/jz4780-dma.txt
delete mode 100644 Bindings/dma/renesas,rcar-dmac.txt
create mode 100644 Bindings/dma/renesas,rcar-dmac.yaml
delete mode 100644 Bindings/dma/renesas,usb-dmac.txt
create mode 100644 Bindings/dma/renesas,usb-dmac.yaml
delete mode 100644 Bindings/extcon/extcon-arizona.txt
create mode 100644 Bindings/extcon/wlf,arizona.yaml
delete mode 100644 Bindings/gpio/fsl-imx-gpio.txt
create mode 100644 Bindings/gpio/fsl-imx-gpio.yaml
delete mode 100644 Bindings/gpio/gpio-mxs.txt
create mode 100644 Bindings/gpio/gpio-mxs.yaml
create mode 100644 Bindings/gpio/renesas,em-gio.yaml
delete mode 100644 Bindings/gpio/renesas,gpio-rcar.txt
create mode 100644 Bindings/gpio/renesas,rcar-gpio.yaml
create mode 100644 Bindings/gpio/snps,dw-apb-gpio.yaml
delete mode 100644 Bindings/gpio/snps-dwapb-gpio.txt
create mode 100644 Bindings/hwmon/baikal,bt1-pvt.yaml
delete mode 100644 Bindings/hwmon/cirrus,lochnagar.txt
create mode 100644 Bindings/hwmon/cirrus,lochnagar.yaml
create mode 100644 Bindings/i2c/cdns,i2c-r1p10.yaml
delete mode 100644 Bindings/i2c/i2c-cadence.txt
delete mode 100644 Bindings/i2c/i2c-designware.txt
delete mode 100644 Bindings/i2c/i2c-jz4780.txt
create mode 100644 Bindings/i2c/i2c-qcom-cci.txt
delete mode 100644 Bindings/i2c/i2c-xiic.txt
create mode 100644 Bindings/i2c/ingenic,i2c.yaml
create mode 100644 Bindings/i2c/nuvoton,npcm7xx-i2c.yaml
create mode 100644 Bindings/i2c/snps,designware-i2c.yaml
create mode 100644 Bindings/i2c/xlnx,xps-iic-2.00.a.yaml
create mode 100644 Bindings/iio/adc/adi,ad9467.yaml
create mode 100644 Bindings/iio/adc/adi,axi-adc.yaml
create mode 100644 Bindings/iio/adc/maxim,max1241.yaml
delete mode 100644 Bindings/iio/adc/rockchip-saradc.txt
create mode 100644 Bindings/iio/adc/rockchip-saradc.yaml
create mode 100644 Bindings/iio/chemical/ams,ccs811.yaml
create mode 100644 Bindings/iio/common.yaml
delete mode 100644 Bindings/iio/dac/st,stm32-dac.txt
create mode 100644 Bindings/iio/dac/st,stm32-dac.yaml
create mode 100644 Bindings/iio/imu/adi,adis16475.yaml
delete mode 100644 Bindings/iio/imu/bmi160.txt
create mode 100644 Bindings/iio/imu/bosch,bmi160.yaml
create mode 100644 Bindings/iio/light/amstaos,tsl2563.yaml
delete mode 100644 Bindings/iio/light/tsl2563.txt
delete mode 100644 Bindings/iio/light/vcnl4000.txt
create mode 100644 Bindings/iio/light/vishay,vcnl4000.yaml
create mode 100644 Bindings/iio/proximity/vishay,vcnl3020.yaml
create mode 100644 Bindings/index.rst
delete mode 100644 Bindings/input/elants_i2c.txt
delete mode 100644 Bindings/input/gpio-keys-polled.txt
delete mode 100644 Bindings/input/gpio-keys.txt
create mode 100644 Bindings/input/gpio-keys.yaml
create mode 100644 Bindings/input/iqs269a.yaml
delete mode 100644 Bindings/input/msm-vibrator.txt
create mode 100644 Bindings/input/touchscreen/cypress,cy8ctma140.yaml
create mode 100644 Bindings/input/touchscreen/elan,elants_i2c.yaml
create mode 100644 Bindings/interconnect/fsl,imx8m-noc.yaml
delete mode 100644 Bindings/interrupt-controller/fsl,irqsteer.txt
create mode 100644 Bindings/interrupt-controller/fsl,irqsteer.yaml
delete mode 100644 Bindings/interrupt-controller/ingenic,intc.txt
create mode 100644 Bindings/interrupt-controller/ingenic,intc.yaml
create mode 100644 Bindings/interrupt-controller/loongson,htvec.yaml
create mode 100644 Bindings/interrupt-controller/loongson,pch-msi.yaml
create mode 100644 Bindings/interrupt-controller/loongson,pch-pic.yaml
delete mode 100644 Bindings/interrupt-controller/renesas,intc-irqpin.txt
create mode 100644 Bindings/interrupt-controller/renesas,intc-irqpin.yaml
create mode 100644 Bindings/iommu/allwinner,sun50i-h6-iommu.yaml
delete mode 100644 Bindings/iommu/renesas,ipmmu-vmsa.txt
create mode 100644 Bindings/iommu/renesas,ipmmu-vmsa.yaml
delete mode 100644 Bindings/ipmi/ipmi-smic.txt
create mode 100644 Bindings/ipmi/ipmi-smic.yaml
delete mode 100644 Bindings/leds/backlight/qcom-wled.txt
create mode 100644 Bindings/leds/backlight/qcom-wled.yaml
create mode 100644 Bindings/leds/leds-aw2013.yaml
create mode 100644 Bindings/leds/leds-sgm3140.yaml
delete mode 100644 Bindings/mailbox/fsl,mu.txt
create mode 100644 Bindings/mailbox/fsl,mu.yaml
delete mode 100644 Bindings/mailbox/qcom,apcs-kpss-global.txt
create mode 100644 Bindings/mailbox/qcom,apcs-kpss-global.yaml
create mode 100644 Bindings/mailbox/qcom-ipcc.yaml
create mode 100644 Bindings/mailbox/sprd-mailbox.yaml
create mode 100644 Bindings/media/i2c/ov8856.yaml
delete mode 100644 Bindings/media/marvell,mmp2-ccic.txt
create mode 100644 Bindings/media/marvell,mmp2-ccic.yaml
create mode 100644 Bindings/media/rockchip,vdec.yaml
delete mode 100644 Bindings/media/rockchip-rga.txt
create mode 100644 Bindings/media/rockchip-rga.yaml
delete mode 100644 Bindings/media/rockchip-vpu.txt
create mode 100644 Bindings/media/rockchip-vpu.yaml
create mode 100644 Bindings/memory-controllers/baikal,bt1-l2-ctl.yaml
delete mode 100644 Bindings/memory-controllers/calxeda-ddr-ctrlr.txt
create mode 100644 Bindings/memory-controllers/calxeda-ddr-ctrlr.yaml
delete mode 100644 Bindings/memory-controllers/ingenic,jz4780-nemc.txt
create mode 100644 Bindings/memory-controllers/ingenic,nemc.yaml
create mode 100644 Bindings/memory-controllers/nvidia,tegra210-emc.yaml
delete mode 100644 Bindings/memory-controllers/renesas,dbsc.txt
create mode 100644 Bindings/memory-controllers/renesas,dbsc.yaml
delete mode 100644 Bindings/mfd/arizona.txt
delete mode 100644 Bindings/mfd/cirrus,lochnagar.txt
create mode 100644 Bindings/mfd/cirrus,lochnagar.yaml
create mode 100644 Bindings/mfd/cirrus,madera.yaml
create mode 100644 Bindings/mfd/gateworks-gsc.yaml
delete mode 100644 Bindings/mfd/madera.txt
create mode 100644 Bindings/mfd/mps,mp2629.yaml
create mode 100644 Bindings/mfd/wlf,arizona.yaml
create mode 100644 Bindings/mips/loongson/rs780e-acpi.yaml
create mode 100644 Bindings/mmc/amlogic,meson-mx-sdhc.yaml
create mode 100644 Bindings/mmc/ingenic,mmc.yaml
delete mode 100644 Bindings/mmc/jz4740.txt
delete mode 100644 Bindings/mmc/sdhci-pxa.txt
create mode 100644 Bindings/mmc/sdhci-pxa.yaml
create mode 100644 Bindings/mtd/arasan,nand-controller.yaml
delete mode 100644 Bindings/mtd/ingenic,jz4780-nand.txt
create mode 100644 Bindings/mtd/ingenic,nand.yaml
delete mode 100644 Bindings/net/calxeda-xgmac.txt
create mode 100644 Bindings/net/calxeda-xgmac.yaml
create mode 100644 Bindings/net/imx-dwmac.txt
create mode 100644 Bindings/net/mediatek,star-emac.yaml
create mode 100644 Bindings/net/nxp,tja11xx.yaml
delete mode 100644 Bindings/net/qca,ar71xx.txt
create mode 100644 Bindings/net/qca,ar71xx.yaml
create mode 100644 Bindings/net/qcom,ipq4019-mdio.yaml
create mode 100644 Bindings/net/realtek-bluetooth.yaml
delete mode 100644 Bindings/net/socionext,uniphier-ave4.txt
create mode 100644 Bindings/net/socionext,uniphier-ave4.yaml
delete mode 100644 Bindings/net/stm32-dwmac.txt
create mode 100644 Bindings/net/stm32-dwmac.yaml
delete mode 100644 Bindings/net/ti,dp83867.txt
create mode 100644 Bindings/net/ti,dp83867.yaml
create mode 100644 Bindings/net/ti,k3-am654-cpts.yaml
delete mode 100644 Bindings/nvmem/imx-iim.txt
create mode 100644 Bindings/nvmem/imx-iim.yaml
delete mode 100644 Bindings/nvmem/imx-ocotp.txt
create mode 100644 Bindings/nvmem/imx-ocotp.yaml
delete mode 100644 Bindings/nvmem/mxs-ocotp.txt
create mode 100644 Bindings/nvmem/mxs-ocotp.yaml
delete mode 100644 Bindings/nvmem/rockchip-efuse.txt
create mode 100644 Bindings/nvmem/rockchip-efuse.yaml
create mode 100644 Bindings/pci/cdns-pcie-ep.yaml
create mode 100644 Bindings/pci/loongson.yaml
create mode 100644 Bindings/pci/rcar-pci-ep.yaml
create mode 100644 Bindings/pci/socionext,uniphier-pcie-ep.yaml
create mode 100644 Bindings/phy/amlogic,meson8b-usb2-phy.yaml
delete mode 100644 Bindings/phy/calxeda-combophy.txt
create mode 100644 Bindings/phy/calxeda-combophy.yaml
create mode 100644 Bindings/phy/cdns,salvo-phy.yaml
create mode 100644 Bindings/phy/intel,combo-phy.yaml
delete mode 100644 Bindings/phy/meson-gxl-usb3-phy.txt
delete mode 100644 Bindings/phy/meson8b-usb2-phy.txt
create mode 100644 Bindings/phy/qcom,qmp-phy.yaml
create mode 100644 Bindings/phy/qcom,qmp-usb3-dp-phy.yaml
create mode 100644 Bindings/phy/qcom,usb-snps-femto-v2.yaml
delete mode 100644 Bindings/phy/qcom-qmp-phy.txt
create mode 100644 Bindings/phy/qcom-usb-ipq4019-phy.yaml
delete mode 100644 Bindings/phy/rcar-gen3-phy-usb2.txt
delete mode 100644 Bindings/phy/rcar-gen3-phy-usb3.txt
create mode 100644 Bindings/phy/renesas,usb2-phy.yaml
create mode 100644 Bindings/phy/renesas,usb3-phy.yaml
create mode 100644 Bindings/phy/rockchip-mipi-dphy-rx0.yaml
create mode 100644 Bindings/phy/socionext,uniphier-pcie-phy.yaml
create mode 100644 Bindings/phy/socionext,uniphier-usb2-phy.yaml
create mode 100644 Bindings/phy/socionext,uniphier-usb3hs-phy.yaml
create mode 100644 Bindings/phy/socionext,uniphier-usb3ss-phy.yaml
delete mode 100644 Bindings/phy/uniphier-pcie-phy.txt
delete mode 100644 Bindings/phy/uniphier-usb2-phy.txt
delete mode 100644 Bindings/phy/uniphier-usb3-hsphy.txt
delete mode 100644 Bindings/phy/uniphier-usb3-ssphy.txt
delete mode 100644 Bindings/pinctrl/cirrus,lochnagar.txt
create mode 100644 Bindings/pinctrl/cirrus,lochnagar.yaml
delete mode 100644 Bindings/pinctrl/cirrus,madera-pinctrl.txt
create mode 100644 Bindings/pinctrl/cirrus,madera.yaml
create mode 100644 Bindings/pinctrl/qcom,sm8250-pinctrl.yaml
delete mode 100644 Bindings/power/fsl,imx-gpc.txt
create mode 100644 Bindings/power/fsl,imx-gpc.yaml
delete mode 100644 Bindings/power/fsl,imx-gpcv2.txt
create mode 100644 Bindings/power/fsl,imx-gpcv2.yaml
delete mode 100644 Bindings/power/reset/syscon-reboot-mode.txt
create mode 100644 Bindings/power/reset/syscon-reboot-mode.yaml
delete mode 100644 Bindings/power/supply/bq27xxx.txt
create mode 100644 Bindings/power/supply/bq27xxx.yaml
create mode 100644 Bindings/power/supply/cw2015_battery.yaml
create mode 100644 Bindings/power/supply/power-supply.yaml
create mode 100644 Bindings/power/supply/rohm,bd99954.yaml
create mode 100644 Bindings/power/supply/sbs,sbs-battery.yaml
delete mode 100644 Bindings/power/supply/sbs_sbs-battery.txt
delete mode 100644 Bindings/pwm/imx-pwm.txt
create mode 100644 Bindings/pwm/imx-pwm.yaml
delete mode 100644 Bindings/pwm/imx-tpm-pwm.txt
create mode 100644 Bindings/pwm/imx-tpm-pwm.yaml
delete mode 100644 Bindings/pwm/mxs-pwm.txt
create mode 100644 Bindings/pwm/mxs-pwm.yaml
delete mode 100644 Bindings/regulator/anatop-regulator.txt
create mode 100644 Bindings/regulator/anatop-regulator.yaml
delete mode 100644 Bindings/regulator/arizona-regulator.txt
delete mode 100644 Bindings/regulator/cirrus,lochnagar.txt
create mode 100644 Bindings/regulator/maxim,max77826.yaml
create mode 100644 Bindings/regulator/wlf,arizona.yaml
create mode 100644 Bindings/remoteproc/ingenic,vpu.yaml
create mode 100644 Bindings/rng/arm-cctrng.yaml
delete mode 100644 Bindings/rtc/dw-apb.txt
delete mode 100644 Bindings/rtc/rtc-mxc.txt
create mode 100644 Bindings/rtc/rtc-mxc.yaml
delete mode 100644 Bindings/rtc/rtc-mxc_v2.txt
create mode 100644 Bindings/rtc/rtc-mxc_v2.yaml
delete mode 100644 Bindings/serial/8250.txt
create mode 100644 Bindings/serial/8250.yaml
delete mode 100644 Bindings/serial/ingenic,uart.txt
create mode 100644 Bindings/serial/ingenic,uart.yaml
delete mode 100644 Bindings/serial/mrvl-serial.txt
delete mode 100644 Bindings/serial/qca,ar9330-uart.txt
create mode 100644 Bindings/serial/qca,ar9330-uart.yaml
create mode 100644 Bindings/serial/renesas,em-uart.yaml
delete mode 100644 Bindings/soc/qcom/qcom,geni-se.txt
create mode 100644 Bindings/soc/qcom/qcom,geni-se.yaml
create mode 100644 Bindings/soc/ti/k3-socinfo.yaml
delete mode 100644 Bindings/sound/cirrus,lochnagar.txt
create mode 100644 Bindings/sound/cirrus,lochnagar.yaml
create mode 100644 Bindings/sound/cirrus,madera.yaml
create mode 100644 Bindings/sound/fsl,easrc.yaml
delete mode 100644 Bindings/sound/madera.txt
create mode 100644 Bindings/sound/marvell,mmp-sspa.yaml
create mode 100644 Bindings/sound/rt1016.txt
delete mode 100644 Bindings/sound/simple-card.txt
create mode 100644 Bindings/sound/simple-card.yaml
delete mode 100644 Bindings/sound/wlf,arizona.txt
create mode 100644 Bindings/sound/wlf,arizona.yaml
create mode 100644 Bindings/sound/zl38060.yaml
create mode 100644 Bindings/spi/marvell,mmp2-ssp.yaml
create mode 100644 Bindings/spi/mikrotik,rb4xx-spi.yaml
create mode 100644 Bindings/spi/renesas,rspi.yaml
delete mode 100644 Bindings/spi/snps,dw-apb-ssi.txt
create mode 100644 Bindings/spi/snps,dw-apb-ssi.yaml
create mode 100644 Bindings/spi/socionext,uniphier-spi.yaml
delete mode 100644 Bindings/spi/spi-dw.txt
delete mode 100644 Bindings/spi/spi-pxa2xx.txt
delete mode 100644 Bindings/spi/spi-rspi.txt
delete mode 100644 Bindings/spi/spi-uniphier.txt
delete mode 100644 Bindings/sram/rockchip-pmu-sram.txt
rename Bindings/{submitting-patches.txt => submitting-patches.rst} (92%)
delete mode 100644 Bindings/thermal/imx-thermal.txt
create mode 100644 Bindings/thermal/imx-thermal.yaml
delete mode 100644 Bindings/thermal/imx8mm-thermal.txt
create mode 100644 Bindings/thermal/imx8mm-thermal.yaml
delete mode 100644 Bindings/thermal/rcar-gen3-thermal.txt
create mode 100644 Bindings/thermal/rcar-gen3-thermal.yaml
create mode 100644 Bindings/thermal/socionext,uniphier-thermal.yaml
create mode 100644 Bindings/thermal/thermal-cooling-devices.yaml
create mode 100644 Bindings/thermal/thermal-idle.yaml
create mode 100644 Bindings/thermal/thermal-sensor.yaml
create mode 100644 Bindings/thermal/thermal-zones.yaml
create mode 100644 Bindings/thermal/ti,am654-thermal.yaml
delete mode 100644 Bindings/thermal/uniphier-thermal.txt
delete mode 100644 Bindings/timer/cadence,ttc-timer.txt
create mode 100644 Bindings/timer/cdns,ttc.yaml
delete mode 100644 Bindings/timer/fsl,imxgpt.txt
create mode 100644 Bindings/timer/fsl,imxgpt.yaml
delete mode 100644 Bindings/timer/ingenic,tcu.txt
create mode 100644 Bindings/timer/ingenic,tcu.yaml
delete mode 100644 Bindings/timer/nxp,sysctr-timer.txt
create mode 100644 Bindings/timer/nxp,sysctr-timer.yaml
delete mode 100644 Bindings/timer/nxp,tpm-timer.txt
create mode 100644 Bindings/timer/nxp,tpm-timer.yaml
delete mode 100644 Bindings/timer/renesas,cmt.txt
create mode 100644 Bindings/timer/renesas,cmt.yaml
create mode 100644 Bindings/timer/renesas,em-sti.yaml
delete mode 100644 Bindings/timer/renesas,mtu2.txt
create mode 100644 Bindings/timer/renesas,mtu2.yaml
delete mode 100644 Bindings/timer/renesas,ostm.txt
create mode 100644 Bindings/timer/renesas,ostm.yaml
create mode 100644 Bindings/timer/snps,dw-apb-timer.yaml
delete mode 100644 Bindings/usb/amlogic,dwc3.txt
create mode 100644 Bindings/usb/brcm,bcm7445-ehci.yaml
delete mode 100644 Bindings/usb/ehci-mv.txt
delete mode 100644 Bindings/usb/keystone-usb.txt
create mode 100644 Bindings/usb/marvell,pxau2o-ehci.yaml
delete mode 100644 Bindings/usb/qcom,dwc3.txt
create mode 100644 Bindings/usb/qcom,dwc3.yaml
create mode 100644 Bindings/usb/ti,keystone-dwc3.yaml
create mode 100644 Bindings/usb/ti,tps6598x.yaml
delete mode 100644 Bindings/usb/usb-conn-gpio.txt
create mode 100644 Bindings/watchdog/arm-smc-wdt.yaml
delete mode 100644 Bindings/watchdog/fsl-imx-wdt.txt
create mode 100644 Bindings/watchdog/fsl-imx-wdt.yaml
delete mode 100644 Bindings/watchdog/fsl-imx7ulp-wdt.txt
create mode 100644 Bindings/watchdog/fsl-imx7ulp-wdt.yaml
delete mode 100644 Bindings/watchdog/renesas,wdt.txt
create mode 100644 Bindings/watchdog/renesas,wdt.yaml
create mode 100644 Bindings/watchdog/socionext,uniphier-wdt.yaml
delete mode 100644 Bindings/watchdog/uniphier-wdt.txt
rename Bindings/{writing-bindings.txt => writing-bindings.rst} (89%)
create mode 100644 include/dt-bindings/clock/agilex-clock.h
create mode 100644 include/dt-bindings/clock/bt1-ccu.h
create mode 100644 include/dt-bindings/clock/intel,lgm-clk.h
create mode 100644 include/dt-bindings/clock/marvell,mmp2-audio.h
create mode 100644 include/dt-bindings/clock/mt6765-clk.h
create mode 100644 include/dt-bindings/clock/qcom,gcc-msm8939.h
create mode 100644 include/dt-bindings/clock/r8a7742-cpg-mssr.h
create mode 100644 include/dt-bindings/clock/x1830-cgu.h
create mode 100644 include/dt-bindings/interconnect/imx8mm.h
create mode 100644 include/dt-bindings/interconnect/imx8mn.h
create mode 100644 include/dt-bindings/interconnect/imx8mq.h
create mode 100644 include/dt-bindings/mailbox/qcom-ipcc.h
create mode 100644 include/dt-bindings/pinctrl/pads-imx8dxl.h
create mode 100644 include/dt-bindings/power/marvell,mmp2.h
create mode 100644 include/dt-bindings/power/meson-gxbb-power.h
create mode 100644 include/dt-bindings/power/meson8-power.h
create mode 100644 include/dt-bindings/power/r8a7742-sysc.h
create mode 100644 include/dt-bindings/reset/bt1-ccu.h
create mode 100644 include/dt-bindings/reset/imx8mp-reset.h
create mode 100644 include/dt-bindings/reset/qcom,gcc-msm8939.h
create mode 100644 include/dt-bindings/reset/realtek,rtd1195.h
create mode 100644 src/arm/am5729-beagleboneai.dts
create mode 100644 src/arm/aspeed-bmc-facebook-yosemitev2.dts
create mode 100644 src/arm/aspeed-bmc-opp-nicole.dts
create mode 100644 src/arm/at91-sama5d2_icp.dts
create mode 100644 src/arm/bcm2835-rpi-common.dtsi
create mode 100644 src/arm/dra7-ipu-dsp-common.dtsi
create mode 100644 src/arm/dra74-ipu-dsp-common.dtsi
create mode 100644 src/arm/exynos4210-i9100.dts
create mode 100644 src/arm/imx6dl-colibri-v1_1-eval-v3.dts
create mode 100644 src/arm/imx6qdl-colibri-v1_1-uhs.dtsi
create mode 100644 src/arm/integratorap-im-pd1.dts
create mode 100644 src/arm/kirkwood-l-50.dts
create mode 100644 src/arm/r8a7742-iwg21d-q7.dts
create mode 100644 src/arm/r8a7742-iwg21m.dtsi
create mode 100644 src/arm/r8a7742.dtsi
create mode 100644 src/arm/rtd1195-horseradish.dts
create mode 100644 src/arm/rtd1195-mele-x1000.dts
create mode 100644 src/arm/rtd1195.dtsi
create mode 100644 src/arm/stm32mp157a-dhcor-avenger96.dts
create mode 100644 src/arm/stm32mp157a-iot-box.dts
create mode 100644 src/arm/stm32mp157a-stinger96.dts
create mode 100644 src/arm/stm32mp157a-stinger96.dtsi
create mode 100644 src/arm/stm32mp157c-lxa-mc1.dts
create mode 100644 src/arm/stm32mp15xx-dhcom-pdk2.dtsi
rename src/arm/{stm32mp157c-dhcom-som.dtsi => stm32mp15xx-dhcom-som.dtsi} (98%)
create mode 100644 src/arm/stm32mp15xx-dhcor-avenger96.dtsi
create mode 100644 src/arm/stm32mp15xx-dhcor-io1v8.dtsi
create mode 100644 src/arm/stm32mp15xx-dhcor-som.dtsi
create mode 100644 src/arm/stm32mp15xx-osd32.dtsi
create mode 100644 src/arm/sun7i-a20-olinuxino-lime-emmc.dts
create mode 100644 src/arm64/allwinner/sun50i-h6-cpu-opp.dtsi
create mode 100644 src/arm64/amlogic/meson-g12b-gtking-pro.dts
create mode 100644 src/arm64/amlogic/meson-g12b-gtking.dts
create mode 100644 src/arm64/amlogic/meson-g12b-w400.dtsi
create mode 100644 src/arm64/amlogic/meson-gxl-s805x.dtsi
create mode 100644 src/arm64/amlogic/meson-gxl-s905d-sml5442tw.dts
create mode 100644 src/arm64/amlogic/meson-sm1-odroid-c4.dts
create mode 100644 src/arm64/freescale/imx8mm-beacon-baseboard.dtsi
create mode 100644 src/arm64/freescale/imx8mm-beacon-kit.dts
create mode 100644 src/arm64/freescale/imx8mm-beacon-som.dtsi
create mode 100644 src/arm64/mediatek/mt6358.dtsi
create mode 100644 src/arm64/mediatek/mt8173-elm-hana-rev7.dts
create mode 100644 src/arm64/mediatek/mt8173-elm-hana.dts
create mode 100644 src/arm64/mediatek/mt8173-elm-hana.dtsi
create mode 100644 src/arm64/mediatek/mt8173-elm.dts
create mode 100644 src/arm64/mediatek/mt8173-elm.dtsi
delete mode 100644 src/arm64/qcom/apq8016-sbc-pmic-pins.dtsi
delete mode 100644 src/arm64/qcom/apq8016-sbc-soc-pins.dtsi
create mode 100644 src/arm64/qcom/sdm660-xiaomi-lavender.dts
create mode 100644 src/arm64/qcom/sdm660.dtsi
create mode 100644 src/arm64/realtek/rtd1295-xnano-x5.dts
create mode 100644 src/arm64/realtek/rtd1395-bpi-m4.dts
create mode 100644 src/arm64/realtek/rtd1395-lionskin.dts
create mode 100644 src/arm64/realtek/rtd1395.dtsi
create mode 100644 src/arm64/realtek/rtd139x.dtsi
create mode 100644 src/arm64/realtek/rtd1619-mjolnir.dts
create mode 100644 src/arm64/realtek/rtd1619.dtsi
create mode 100644 src/arm64/realtek/rtd16xx.dtsi
create mode 100644 src/arm64/renesas/aistarvision-mipi-adapter-2.1.dtsi
create mode 100644 src/arm64/renesas/r8a774c0-ek874-mipi-2.1.dts
create mode 100644 src/arm64/rockchip/rk3326-odroid-go2.dts
create mode 100644 src/arm64/rockchip/rk3326.dtsi
create mode 100644 src/arm64/socionext/uniphier-ld20-akebi96.dts
create mode 100644 src/arm64/ti/k3-am654-industrial-thermal.dtsi
create mode 100644 src/mips/ingenic/gcw0_proto.dts
delete mode 100644 src/powerpc/ep405.dts
delete mode 100644 src/powerpc/virtex440-ml507.dts
delete mode 100644 src/powerpc/virtex440-ml510.dts
delete mode 100644 src/powerpc/walnut.dts
diff --git a/Bindings/ABI.txt b/Bindings/ABI.rst
similarity index 94%
rename from Bindings/ABI.txt
rename to Bindings/ABI.rst
index d25f8d379680..a885713cf184 100644
--- a/Bindings/ABI.txt
+++ b/Bindings/ABI.rst
@@ -1,5 +1,8 @@
+.. SPDX-License-Identifier: GPL-2.0
- Devicetree (DT) ABI
+===================
+Devicetree (DT) ABI
+===================
I. Regarding stable bindings/ABI, we quote from the 2013 ARM mini-summit
summary document:
diff --git a/Bindings/Makefile b/Bindings/Makefile
index 7782d9985082..91c4d00e96d3 100644
--- a/Bindings/Makefile
+++ b/Bindings/Makefile
@@ -2,13 +2,20 @@
DT_DOC_CHECKER ?= dt-doc-validate
DT_EXTRACT_EX ?= dt-extract-example
DT_MK_SCHEMA ?= dt-mk-schema
-DT_MK_SCHEMA_USERONLY_FLAG := $(if $(DT_SCHEMA_FILES), -u)
+
+DT_SCHEMA_MIN_VERSION = 2020.5
+
+PHONY += check_dtschema_version
+check_dtschema_version:
+ @{ echo $(DT_SCHEMA_MIN_VERSION); \
+ $(DT_DOC_CHECKER) --version 2>/dev/null || echo 0; } | sort -VC || \
+ { echo "ERROR: dtschema minimum version is v$(DT_SCHEMA_MIN_VERSION)" >&2; false; }
quiet_cmd_chk_binding = CHKDT $(patsubst $(srctree)/%,%,$<)
cmd_chk_binding = $(DT_DOC_CHECKER) -u $(srctree)/$(src) $< ; \
$(DT_EXTRACT_EX) $< > $@
-$(obj)/%.example.dts: $(src)/%.yaml FORCE
+$(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE
$(call if_changed,chk_binding)
# Use full schemas when checking %.example.dts
@@ -27,21 +34,40 @@ quiet_cmd_mk_schema = SCHEMA $@
DT_DOCS = $(shell $(find_cmd) | sed -e 's|^$(srctree)/||')
-DT_SCHEMA_FILES ?= $(DT_DOCS)
+override DTC_FLAGS := \
+ -Wno-avoid_unnecessary_addr_size \
+ -Wno-graph_child_address \
+ -Wno-interrupt_provider
+
+$(obj)/processed-schema-examples.yaml: $(DT_DOCS) check_dtschema_version FORCE
+ $(call if_changed,mk_schema)
+
+ifeq ($(DT_SCHEMA_FILES),)
+
+# Unless DT_SCHEMA_FILES is specified, use the full schema for dtbs_check too.
+# Just copy processed-schema-examples.yaml
+
+$(obj)/processed-schema.yaml: $(obj)/processed-schema-examples.yaml FORCE
+ $(call if_changed,copy)
+
+DT_SCHEMA_FILES = $(DT_DOCS)
+
+else
+
+# If DT_SCHEMA_FILES is specified, use it for processed-schema.yaml
+
+$(obj)/processed-schema.yaml: DT_MK_SCHEMA_FLAGS := -u
+$(obj)/processed-schema.yaml: $(DT_SCHEMA_FILES) check_dtschema_version FORCE
+ $(call if_changed,mk_schema)
+
+endif
extra-$(CHECK_DT_BINDING) += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES))
extra-$(CHECK_DT_BINDING) += $(patsubst $(src)/%.yaml,%.example.dt.yaml, $(DT_SCHEMA_FILES))
extra-$(CHECK_DT_BINDING) += processed-schema-examples.yaml
+extra-$(CHECK_DTBS) += processed-schema.yaml
-override DTC_FLAGS := \
- -Wno-avoid_unnecessary_addr_size \
- -Wno-graph_child_address
-
-$(obj)/processed-schema-examples.yaml: $(DT_DOCS) FORCE
- $(call if_changed,mk_schema)
-
-$(obj)/processed-schema.yaml: DT_MK_SCHEMA_FLAGS := $(DT_MK_SCHEMA_USERONLY_FLAG)
-$(obj)/processed-schema.yaml: $(DT_SCHEMA_FILES) FORCE
- $(call if_changed,mk_schema)
-
-extra-y += processed-schema.yaml
+# Hack: avoid 'Argument list too long' error for 'make clean'. Remove most of
+# build artifacts here before they are processed by scripts/Makefile.clean
+clean-files = $(shell find $(obj) \( -name '*.example.dts' -o \
+ -name '*.example.dt.yaml' \) -delete 2>/dev/null)
diff --git a/Bindings/arm/altera.yaml b/Bindings/arm/altera.yaml
index 49e0362ddc11..b388c5aa7984 100644
--- a/Bindings/arm/altera.yaml
+++ b/Bindings/arm/altera.yaml
@@ -13,8 +13,8 @@ properties:
compatible:
items:
- enum:
- - altr,socfpga-cyclone5
- - altr,socfpga-arria5
- - altr,socfpga-arria10
+ - altr,socfpga-cyclone5
+ - altr,socfpga-arria5
+ - altr,socfpga-arria10
- const: altr,socfpga
...
diff --git a/Bindings/arm/amlogic.yaml b/Bindings/arm/amlogic.yaml
index f74aba48cec1..378229fa8310 100644
--- a/Bindings/arm/amlogic.yaml
+++ b/Bindings/arm/amlogic.yaml
@@ -17,7 +17,7 @@ description: |+
any time. Be sure to use a device tree binary and a kernel image
generated from the same source tree.
- Please refer to Documentation/devicetree/bindings/ABI.txt for a definition of a
+ Please refer to Documentation/devicetree/bindings/ABI.rst for a definition of a
stable binding/ABI.
properties:
@@ -107,6 +107,7 @@ properties:
- amlogic,p231
- libretech,aml-s905d-pc
- phicomm,n1
+ - smartlabs,sml5442tw
- const: amlogic,s905d
- const: amlogic,meson-gxl
@@ -148,6 +149,8 @@ properties:
- description: Boards with the Amlogic Meson G12B S922X SoC
items:
- enum:
+ - azw,gtking
+ - azw,gtking-pro
- hardkernel,odroid-n2
- khadas,vim3
- ugoos,am6
@@ -159,6 +162,7 @@ properties:
- enum:
- seirobotics,sei610
- khadas,vim3l
+ - hardkernel,odroid-c4
- const: amlogic,sm1
- description: Boards with the Amlogic Meson A1 A113L SoC
diff --git a/Bindings/arm/amlogic/amlogic,meson-gx-ao-secure.yaml b/Bindings/arm/amlogic/amlogic,meson-gx-ao-secure.yaml
index 66213bd95e6e..6cc74523ebfd 100644
--- a/Bindings/arm/amlogic/amlogic,meson-gx-ao-secure.yaml
+++ b/Bindings/arm/amlogic/amlogic,meson-gx-ao-secure.yaml
@@ -25,7 +25,7 @@ select:
properties:
compatible:
- items:
+ items:
- const: amlogic,meson-gx-ao-secure
- const: syscon
diff --git a/Bindings/arm/arm,scmi.txt b/Bindings/arm/arm,scmi.txt
index dc102c4e4a78..1f293ea24cd8 100644
--- a/Bindings/arm/arm,scmi.txt
+++ b/Bindings/arm/arm,scmi.txt
@@ -14,7 +14,7 @@ Required properties:
The scmi node with the following properties shall be under the /firmware/ node.
-- compatible : shall be "arm,scmi"
+- compatible : shall be "arm,scmi" or "arm,scmi-smc" for smc/hvc transports
- mboxes: List of phandle and mailbox channel specifiers. It should contain
exactly one or two mailboxes, one for transmitting messages("tx")
and another optional for receiving the notifications("rx") if
@@ -25,6 +25,7 @@ The scmi node with the following properties shall be under the /firmware/ node.
protocol identifier for a given sub-node.
- #size-cells : should be '0' as 'reg' property doesn't have any size
associated with it.
+- arm,smc-id : SMC id required when using smc or hvc transports
Optional properties:
diff --git a/Bindings/arm/arm,vexpress-juno.yaml b/Bindings/arm/arm,vexpress-juno.yaml
index 8c06a73f716c..a3420c81cf35 100644
--- a/Bindings/arm/arm,vexpress-juno.yaml
+++ b/Bindings/arm/arm,vexpress-juno.yaml
@@ -131,26 +131,23 @@ properties:
property, describing the physical location of the children nodes.
0 means motherboard site, while 1 and 2 are daughterboard sites, and
0xf means "sisterboard" which is the site containing the main CPU tile.
- allOf:
- - $ref: '/schemas/types.yaml#/definitions/uint32'
- - minimum: 0
- maximum: 15
+ $ref: '/schemas/types.yaml#/definitions/uint32'
+ minimum: 0
+ maximum: 15
arm,vexpress,position:
description: When daughterboards are stacked on one site, their position
in the stack be be described this attribute.
- allOf:
- - $ref: '/schemas/types.yaml#/definitions/uint32'
- - minimum: 0
- maximum: 3
+ $ref: '/schemas/types.yaml#/definitions/uint32'
+ minimum: 0
+ maximum: 3
arm,vexpress,dcc:
description: When describing tiles consisting of more than one DCC, its
number can be specified with this attribute.
- allOf:
- - $ref: '/schemas/types.yaml#/definitions/uint32'
- - minimum: 0
- maximum: 3
+ $ref: '/schemas/types.yaml#/definitions/uint32'
+ minimum: 0
+ maximum: 3
patternProperties:
"^bus@[0-9a-f]+$":
@@ -162,8 +159,7 @@ patternProperties:
"simple-bus". If the compatible is placed in the "motherboard" node,
it is stricter and always has two compatibles.
type: object
- allOf:
- - $ref: '/schemas/simple-bus.yaml'
+ $ref: '/schemas/simple-bus.yaml'
properties:
compatible:
@@ -195,11 +191,11 @@ patternProperties:
- const: simple-bus
arm,v2m-memory-map:
description: This describes the memory map type.
- allOf:
- - $ref: '/schemas/types.yaml#/definitions/string'
- - enum:
- - rs1
- - rs2
+ $ref: '/schemas/types.yaml#/definitions/string'
+ enum:
+ - rs1
+ - rs2
+
required:
- compatible
required:
diff --git a/Bindings/arm/atmel-at91.yaml b/Bindings/arm/atmel-at91.yaml
index 0357314076bc..31b0c54fa2cf 100644
--- a/Bindings/arm/atmel-at91.yaml
+++ b/Bindings/arm/atmel-at91.yaml
@@ -82,6 +82,13 @@ properties:
- const: atmel,sama5d2
- const: atmel,sama5
+ - description: Microchip SAMA5D2 Industrial Connectivity Platform
+ items:
+ - const: microchip,sama5d2-icp
+ - const: atmel,sama5d27
+ - const: atmel,sama5d2
+ - const: atmel,sama5
+
- description: SAM9X60-EK board
items:
- const: microchip,sam9x60ek
diff --git a/Bindings/arm/bitmain.yaml b/Bindings/arm/bitmain.yaml
index 0efdb4ac028e..5cd5b36cff2d 100644
--- a/Bindings/arm/bitmain.yaml
+++ b/Bindings/arm/bitmain.yaml
@@ -13,6 +13,6 @@ properties:
compatible:
items:
- enum:
- - bitmain,sophon-edge
+ - bitmain,sophon-edge
- const: bitmain,bm1880
...
diff --git a/Bindings/arm/calxeda/hb-sregs.yaml b/Bindings/arm/calxeda/hb-sregs.yaml
new file mode 100644
index 000000000000..dfdc97083efb
--- /dev/null
+++ b/Bindings/arm/calxeda/hb-sregs.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/calxeda/hb-sregs.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Calxeda Highbank system registers
+
+description: |
+ The Calxeda Highbank system has a block of MMIO registers controlling
+ several generic system aspects. Those can be used to control some power
+ management, they also contain some gate and PLL clocks.
+
+maintainers:
+ - Andre Przywara
+
+properties:
+ compatible:
+ const: calxeda,hb-sregs
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ type: object
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ sregs@fff3c000 {
+ compatible = "calxeda,hb-sregs";
+ reg = <0xfff3c000 0x1000>;
+
+ clocks {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ osc: oscillator {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <33333000>;
+ };
+ };
+ };
diff --git a/Bindings/arm/calxeda/l2ecc.txt b/Bindings/arm/calxeda/l2ecc.txt
deleted file mode 100644
index 94e642a33db0..000000000000
--- a/Bindings/arm/calxeda/l2ecc.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-Calxeda Highbank L2 cache ECC
-
-Properties:
-- compatible : Should be "calxeda,hb-sregs-l2-ecc"
-- reg : Address and size for ECC error interrupt clear registers.
-- interrupts : Should be single bit error interrupt, then double bit error
- interrupt.
-
-Example:
-
- sregs@fff3c200 {
- compatible = "calxeda,hb-sregs-l2-ecc";
- reg = <0xfff3c200 0x100>;
- interrupts = <0 71 4 0 72 4>;
- };
diff --git a/Bindings/arm/calxeda/l2ecc.yaml b/Bindings/arm/calxeda/l2ecc.yaml
new file mode 100644
index 000000000000..a9fe01238a88
--- /dev/null
+++ b/Bindings/arm/calxeda/l2ecc.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/calxeda/l2ecc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Calxeda Highbank L2 cache ECC
+
+description: |
+ Binding for the Calxeda Highbank L2 cache controller ECC device.
+ This does not cover the actual L2 cache controller control registers,
+ but just the error reporting functionality.
+
+maintainers:
+ - Andre Przywara
+
+properties:
+ compatible:
+ const: "calxeda,hb-sregs-l2-ecc"
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ items:
+ - description: single bit error interrupt
+ - description: double bit error interrupt
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ sregs@fff3c200 {
+ compatible = "calxeda,hb-sregs-l2-ecc";
+ reg = <0xfff3c200 0x100>;
+ interrupts = <0 71 4>, <0 72 4>;
+ };
diff --git a/Bindings/arm/coresight-cti.yaml b/Bindings/arm/coresight-cti.yaml
index 3db3642bd532..17df5cd12d8d 100644
--- a/Bindings/arm/coresight-cti.yaml
+++ b/Bindings/arm/coresight-cti.yaml
@@ -140,16 +140,14 @@ patternProperties:
maxItems: 1
arm,trig-in-sigs:
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32-array
+ $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 32
description:
List of CTI trigger in signal numbers in use by a trig-conns node.
arm,trig-in-types:
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32-array
+ $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 32
description:
@@ -159,16 +157,14 @@ patternProperties:
completely, then the types will default to GEN_IO.
arm,trig-out-sigs:
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32-array
+ $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 32
description:
List of CTI trigger out signal numbers in use by a trig-conns node.
arm,trig-out-types:
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32-array
+ $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 32
description:
@@ -178,8 +174,7 @@ patternProperties:
or omitted completely, then the types will default to GEN_IO.
arm,trig-filters:
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32-array
+ $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 32
description:
@@ -187,8 +182,7 @@ patternProperties:
active, unless filtering is disabled on the driver.
arm,trig-conn-name:
- allOf:
- - $ref: /schemas/types.yaml#/definitions/string
+ $ref: /schemas/types.yaml#/definitions/string
description:
Defines a connection name that will be displayed, if the cpu or
arm,cs-dev-assoc properties are not being used in this connection.
@@ -301,7 +295,7 @@ examples:
- |
cti@20110000 {
compatible = "arm,coresight-cti", "arm,primecell";
- reg = <0 0x20110000 0 0x1000>;
+ reg = <0x20110000 0x1000>;
clocks = <&soc_smc50mhz>;
clock-names = "apb_pclk";
diff --git a/Bindings/arm/cpus.yaml b/Bindings/arm/cpus.yaml
index a01814765ddb..40f692c846f0 100644
--- a/Bindings/arm/cpus.yaml
+++ b/Bindings/arm/cpus.yaml
@@ -167,53 +167,53 @@ properties:
- qcom,kryo260
- qcom,kryo280
- qcom,kryo385
+ - qcom,kryo468
- qcom,kryo485
- qcom,scorpion
enable-method:
- allOf:
- - $ref: '/schemas/types.yaml#/definitions/string'
- - oneOf:
- # On ARM v8 64-bit this property is required
- - enum:
- - psci
- - spin-table
- # On ARM 32-bit systems this property is optional
- - enum:
- - actions,s500-smp
- - allwinner,sun6i-a31
- - allwinner,sun8i-a23
- - allwinner,sun9i-a80-smp
- - allwinner,sun8i-a83t-smp
- - amlogic,meson8-smp
- - amlogic,meson8b-smp
- - arm,realview-smp
- - aspeed,ast2600-smp
- - brcm,bcm11351-cpu-method
- - brcm,bcm23550
- - brcm,bcm2836-smp
- - brcm,bcm63138
- - brcm,bcm-nsp-smp
- - brcm,brahma-b15
- - marvell,armada-375-smp
- - marvell,armada-380-smp
- - marvell,armada-390-smp
- - marvell,armada-xp-smp
- - marvell,98dx3236-smp
- - marvell,mmp3-smp
- - mediatek,mt6589-smp
- - mediatek,mt81xx-tz-smp
- - qcom,gcc-msm8660
- - qcom,kpss-acc-v1
- - qcom,kpss-acc-v2
- - renesas,apmu
- - renesas,r9a06g032-smp
- - rockchip,rk3036-smp
- - rockchip,rk3066-smp
- - socionext,milbeaut-m10v-smp
- - ste,dbx500-smp
- - ti,am3352
- - ti,am4372
+ $ref: '/schemas/types.yaml#/definitions/string'
+ oneOf:
+ # On ARM v8 64-bit this property is required
+ - enum:
+ - psci
+ - spin-table
+ # On ARM 32-bit systems this property is optional
+ - enum:
+ - actions,s500-smp
+ - allwinner,sun6i-a31
+ - allwinner,sun8i-a23
+ - allwinner,sun9i-a80-smp
+ - allwinner,sun8i-a83t-smp
+ - amlogic,meson8-smp
+ - amlogic,meson8b-smp
+ - arm,realview-smp
+ - aspeed,ast2600-smp
+ - brcm,bcm11351-cpu-method
+ - brcm,bcm23550
+ - brcm,bcm2836-smp
+ - brcm,bcm63138
+ - brcm,bcm-nsp-smp
+ - brcm,brahma-b15
+ - marvell,armada-375-smp
+ - marvell,armada-380-smp
+ - marvell,armada-390-smp
+ - marvell,armada-xp-smp
+ - marvell,98dx3236-smp
+ - marvell,mmp3-smp
+ - mediatek,mt6589-smp
+ - mediatek,mt81xx-tz-smp
+ - qcom,gcc-msm8660
+ - qcom,kpss-acc-v1
+ - qcom,kpss-acc-v2
+ - renesas,apmu
+ - renesas,r9a06g032-smp
+ - rockchip,rk3036-smp
+ - rockchip,rk3066-smp
+ - socionext,milbeaut-m10v-smp
+ - ste,dbx500-smp
+ - ti,am3352
+ - ti,am4372
cpu-release-addr:
$ref: '/schemas/types.yaml#/definitions/uint64'
diff --git a/Bindings/arm/freescale/fsl,scu.txt b/Bindings/arm/freescale/fsl,scu.txt
index 623fedf12180..10b8459e49f8 100644
--- a/Bindings/arm/freescale/fsl,scu.txt
+++ b/Bindings/arm/freescale/fsl,scu.txt
@@ -47,7 +47,7 @@ Required properties:
&lsio_mu1 1 2
&lsio_mu1 1 3
&lsio_mu1 3 3>;
- See Documentation/devicetree/bindings/mailbox/fsl,mu.txt
+ See Documentation/devicetree/bindings/mailbox/fsl,mu.yaml
for detailed mailbox binding.
Note: Each mu which supports general interrupt should have an alias correctly
@@ -108,7 +108,8 @@ This binding uses the i.MX common pinctrl binding[3].
Required properties:
- compatible: Should be one of:
"fsl,imx8qm-iomuxc",
- "fsl,imx8qxp-iomuxc".
+ "fsl,imx8qxp-iomuxc",
+ "fsl,imx8dxl-iomuxc".
Required properties for Pinctrl sub nodes:
- fsl,pins: Each entry consists of 3 integers which represents
@@ -116,7 +117,8 @@ Required properties for Pinctrl sub nodes:
integers are specified using a
PIN_FUNC_ID macro, which can be found in
,
- .
+ ,
+ .
The last integer CONFIG is the pad setting value like
pull-up on this pin.
diff --git a/Bindings/arm/fsl.yaml b/Bindings/arm/fsl.yaml
index cd3fbe7e3948..05906e291e38 100644
--- a/Bindings/arm/fsl.yaml
+++ b/Bindings/arm/fsl.yaml
@@ -119,6 +119,7 @@ properties:
- fsl,imx6q-sabreauto
- fsl,imx6q-sabrelite
- fsl,imx6q-sabresd
+ - kontron,imx6q-samx6i # Kontron i.MX6 Dual/Quad SMARC Module
- technexion,imx6q-pico-dwarf # TechNexion i.MX6Q Pico-Dwarf
- technexion,imx6q-pico-hobbit # TechNexion i.MX6Q Pico-Hobbit
- technexion,imx6q-pico-nymph # TechNexion i.MX6Q Pico-Nymph
@@ -170,6 +171,7 @@ properties:
- emtrion,emcon-mx6-avari # emCON-MX6S or emCON-MX6DL SoM on Avari Base
- fsl,imx6dl-sabreauto # i.MX6 DualLite/Solo SABRE Automotive Board
- fsl,imx6dl-sabresd # i.MX6 DualLite SABRE Smart Device Board
+ - kontron,imx6dl-samx6i # Kontron i.MX6 Solo SMARC Module
- technexion,imx6dl-pico-dwarf # TechNexion i.MX6DL Pico-Dwarf
- technexion,imx6dl-pico-hobbit # TechNexion i.MX6DL Pico-Hobbit
- technexion,imx6dl-pico-nymph # TechNexion i.MX6DL Pico-Nymph
@@ -177,7 +179,9 @@ properties:
- technologic,imx6dl-ts4900
- technologic,imx6dl-ts7970
- toradex,colibri_imx6dl # Colibri iMX6 Module
+ - toradex,colibri_imx6dl-v1_1 # Colibri iMX6 Module V1.1
- toradex,colibri_imx6dl-eval-v3 # Colibri iMX6 Module on Colibri Evaluation Board V3
+ - toradex,colibri_imx6dl-v1_1-eval-v3 # Colibri iMX6 Module V1.1 on Colibri Evaluation Board V3
- ysoft,imx6dl-yapp4-draco # i.MX6 DualLite Y Soft IOTA Draco board
- ysoft,imx6dl-yapp4-hydra # i.MX6 DualLite Y Soft IOTA Hydra board
- ysoft,imx6dl-yapp4-ursa # i.MX6 Solo Y Soft IOTA Ursa board
diff --git a/Bindings/arm/l2c2x0.yaml b/Bindings/arm/l2c2x0.yaml
index 5d1d50eea26e..6b8f4d4fa580 100644
--- a/Bindings/arm/l2c2x0.yaml
+++ b/Bindings/arm/l2c2x0.yaml
@@ -70,43 +70,39 @@ properties:
description: Cycles of latency for Data RAM accesses. Specifies 3 cells of
read, write and setup latencies. Minimum valid values are 1. Controllers
without setup latency control should use a value of 0.
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32-array
- - minItems: 2
- maxItems: 3
- items:
- minimum: 0
- maximum: 8
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 2
+ maxItems: 3
+ items:
+ minimum: 0
+ maximum: 8
arm,tag-latency:
description: Cycles of latency for Tag RAM accesses. Specifies 3 cells of
read, write and setup latencies. Controllers without setup latency control
should use 0. Controllers without separate read and write Tag RAM latency
values should only use the first cell.
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32-array
- - minItems: 1
- maxItems: 3
- items:
- minimum: 0
- maximum: 8
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 3
+ items:
+ minimum: 0
+ maximum: 8
arm,dirty-latency:
description: Cycles of latency for Dirty RAMs. This is a single cell.
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32
- - minimum: 1
- maximum: 8
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 1
+ maximum: 8
arm,filter-ranges:
description: Starting address and length of window to
filter. Addresses in the filter window are directed to the M1 port. Other
addresses will go to the M0 port.
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32-array
- - items:
- minItems: 2
- maxItems: 2
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ items:
+ minItems: 2
+ maxItems: 2
arm,io-coherent:
description: indicates that the system is operating in an hardware
@@ -131,36 +127,31 @@ properties:
arm,double-linefill:
description: Override double linefill enable setting. Enable if
non-zero, disable if zero.
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32
- - enum: [ 0, 1 ]
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
arm,double-linefill-incr:
description: Override double linefill on INCR read. Enable
if non-zero, disable if zero.
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32
- - enum: [ 0, 1 ]
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
arm,double-linefill-wrap:
description: Override double linefill on WRAP read. Enable
if non-zero, disable if zero.
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32
- - enum: [ 0, 1 ]
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
arm,prefetch-drop:
description: Override prefetch drop enable setting. Enable if non-zero,
disable if zero.
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32
- - enum: [ 0, 1 ]
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
arm,prefetch-offset:
description: Override prefetch offset value.
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32
- - enum: [ 0, 1, 2, 3, 4, 5, 6, 7, 15, 23, 31 ]
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2, 3, 4, 5, 6, 7, 15, 23, 31]
arm,shared-override:
description: The default behavior of the L220 or PL310 cache
@@ -193,35 +184,31 @@ properties:
description: |
Data prefetch. Value: <0> (forcibly disable), <1>
(forcibly enable), property absent (retain settings set by firmware)
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32
- - enum: [ 0, 1 ]
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
prefetch-instr:
description: |
Instruction prefetch. Value: <0> (forcibly disable),
<1> (forcibly enable), property absent (retain settings set by
firmware)
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32
- - enum: [ 0, 1 ]
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
arm,dynamic-clock-gating:
description: |
L2 dynamic clock gating. Value: <0> (forcibly
disable), <1> (forcibly enable), property absent (OS specific behavior,
preferably retain firmware settings)
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32
- - enum: [ 0, 1 ]
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
arm,standby-mode:
description: L2 standby mode enable. Value <0> (forcibly disable),
<1> (forcibly enable), property absent (OS specific behavior,
preferably retain firmware settings)
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32
- - enum: [ 0, 1 ]
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
arm,early-bresp-disable:
description: Disable the CA9 optimization Early BRESP (PL310)
diff --git a/Bindings/arm/mediatek.yaml b/Bindings/arm/mediatek.yaml
index 4043c5046441..abc544dde692 100644
--- a/Bindings/arm/mediatek.yaml
+++ b/Bindings/arm/mediatek.yaml
@@ -84,6 +84,28 @@ properties:
- enum:
- mediatek,mt8135-evbp1
- const: mediatek,mt8135
+ - description: Google Elm (Acer Chromebook R13)
+ items:
+ - const: google,elm-rev8
+ - const: google,elm-rev7
+ - const: google,elm-rev6
+ - const: google,elm-rev5
+ - const: google,elm-rev4
+ - const: google,elm-rev3
+ - const: google,elm
+ - const: mediatek,mt8173
+ - description: Google Hana (Lenovo Chromebook N23 Yoga, C330, 300e,...)
+ items:
+ - const: google,hana-rev6
+ - const: google,hana-rev5
+ - const: google,hana-rev4
+ - const: google,hana-rev3
+ - const: google,hana
+ - const: mediatek,mt8173
+ - description: Google Hana rev7 (Poin2 Chromebook 11C)
+ items:
+ - const: google,hana-rev7
+ - const: mediatek,mt8173
- items:
- enum:
- mediatek,mt8173-evb
diff --git a/Bindings/arm/mediatek/mediatek,apmixedsys.txt b/Bindings/arm/mediatek/mediatek,apmixedsys.txt
index ff000ccade78..bd7a0fa5801b 100644
--- a/Bindings/arm/mediatek/mediatek,apmixedsys.txt
+++ b/Bindings/arm/mediatek/mediatek,apmixedsys.txt
@@ -8,6 +8,7 @@ Required Properties:
- compatible: Should be one of:
- "mediatek,mt2701-apmixedsys"
- "mediatek,mt2712-apmixedsys", "syscon"
+ - "mediatek,mt6765-apmixedsys", "syscon"
- "mediatek,mt6779-apmixedsys", "syscon"
- "mediatek,mt6797-apmixedsys"
- "mediatek,mt7622-apmixedsys"
diff --git a/Bindings/arm/mediatek/mediatek,audsys.txt b/Bindings/arm/mediatek/mediatek,audsys.txt
index e4ca7b703123..38309db115f5 100644
--- a/Bindings/arm/mediatek/mediatek,audsys.txt
+++ b/Bindings/arm/mediatek/mediatek,audsys.txt
@@ -7,6 +7,7 @@ Required Properties:
- compatible: Should be one of:
- "mediatek,mt2701-audsys", "syscon"
+ - "mediatek,mt6765-audsys", "syscon"
- "mediatek,mt6779-audio", "syscon"
- "mediatek,mt7622-audsys", "syscon"
- "mediatek,mt7623-audsys", "mediatek,mt2701-audsys", "syscon"
diff --git a/Bindings/arm/mediatek/mediatek,camsys.txt b/Bindings/arm/mediatek/mediatek,camsys.txt
index 1f4aaa15a37e..a0ce82085ad0 100644
--- a/Bindings/arm/mediatek/mediatek,camsys.txt
+++ b/Bindings/arm/mediatek/mediatek,camsys.txt
@@ -6,6 +6,7 @@ The MediaTek camsys controller provides various clocks to the system.
Required Properties:
- compatible: Should be one of:
+ - "mediatek,mt6765-camsys", "syscon"
- "mediatek,mt6779-camsys", "syscon"
- "mediatek,mt8183-camsys", "syscon"
- #clock-cells: Must be 1
diff --git a/Bindings/arm/mediatek/mediatek,imgsys.txt b/Bindings/arm/mediatek/mediatek,imgsys.txt
index 2b693e343c56..1e1f00718a7d 100644
--- a/Bindings/arm/mediatek/mediatek,imgsys.txt
+++ b/Bindings/arm/mediatek/mediatek,imgsys.txt
@@ -8,6 +8,7 @@ Required Properties:
- compatible: Should be one of:
- "mediatek,mt2701-imgsys", "syscon"
- "mediatek,mt2712-imgsys", "syscon"
+ - "mediatek,mt6765-imgsys", "syscon"
- "mediatek,mt6779-imgsys", "syscon"
- "mediatek,mt6797-imgsys", "syscon"
- "mediatek,mt7623-imgsys", "mediatek,mt2701-imgsys", "syscon"
diff --git a/Bindings/arm/mediatek/mediatek,infracfg.txt b/Bindings/arm/mediatek/mediatek,infracfg.txt
index db2f4fd754e7..49a968be1a80 100644
--- a/Bindings/arm/mediatek/mediatek,infracfg.txt
+++ b/Bindings/arm/mediatek/mediatek,infracfg.txt
@@ -9,6 +9,7 @@ Required Properties:
- compatible: Should be one of:
- "mediatek,mt2701-infracfg", "syscon"
- "mediatek,mt2712-infracfg", "syscon"
+ - "mediatek,mt6765-infracfg", "syscon"
- "mediatek,mt6779-infracfg_ao", "syscon"
- "mediatek,mt6797-infracfg", "syscon"
- "mediatek,mt7622-infracfg", "syscon"
diff --git a/Bindings/arm/mediatek/mediatek,mipi0a.txt b/Bindings/arm/mediatek/mediatek,mipi0a.txt
new file mode 100644
index 000000000000..8be5978f388d
--- /dev/null
+++ b/Bindings/arm/mediatek/mediatek,mipi0a.txt
@@ -0,0 +1,28 @@
+Mediatek mipi0a (mipi_rx_ana_csi0a) controller
+============================
+
+The Mediatek mipi0a controller provides various clocks
+to the system.
+
+Required Properties:
+
+- compatible: Should be one of:
+ - "mediatek,mt6765-mipi0a", "syscon"
+- #clock-cells: Must be 1
+
+The mipi0a controller uses the common clk binding from
+Documentation/devicetree/bindings/clock/clock-bindings.txt
+The available clocks are defined in dt-bindings/clock/mt*-clk.h.
+
+The mipi0a controller also uses the common power domain from
+Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
+The available power doamins are defined in dt-bindings/power/mt*-power.h.
+
+Example:
+
+mipi0a: clock-controller@11c10000 {
+ compatible = "mediatek,mt6765-mipi0a", "syscon";
+ reg = <0 0x11c10000 0 0x1000>;
+ power-domains = <&scpsys MT6765_POWER_DOMAIN_CAM>;
+ #clock-cells = <1>;
+};
diff --git a/Bindings/arm/mediatek/mediatek,mmsys.txt b/Bindings/arm/mediatek/mediatek,mmsys.txt
index 301eefbe1618..d8c9108c3b4a 100644
--- a/Bindings/arm/mediatek/mediatek,mmsys.txt
+++ b/Bindings/arm/mediatek/mediatek,mmsys.txt
@@ -1,13 +1,15 @@
Mediatek mmsys controller
============================
-The Mediatek mmsys controller provides various clocks to the system.
+The Mediatek mmsys system controller provides clock control, routing control,
+and miscellaneous control in mmsys partition.
Required Properties:
- compatible: Should be one of:
- "mediatek,mt2701-mmsys", "syscon"
- "mediatek,mt2712-mmsys", "syscon"
+ - "mediatek,mt6765-mmsys", "syscon"
- "mediatek,mt6779-mmsys", "syscon"
- "mediatek,mt6797-mmsys", "syscon"
- "mediatek,mt7623-mmsys", "mediatek,mt2701-mmsys", "syscon"
@@ -15,13 +17,13 @@ Required Properties:
- "mediatek,mt8183-mmsys", "syscon"
- #clock-cells: Must be 1
-The mmsys controller uses the common clk binding from
+For the clock control, the mmsys controller uses the common clk binding from
Documentation/devicetree/bindings/clock/clock-bindings.txt
The available clocks are defined in dt-bindings/clock/mt*-clk.h.
Example:
-mmsys: clock-controller@14000000 {
+mmsys: syscon@14000000 {
compatible = "mediatek,mt8173-mmsys", "syscon";
reg = <0 0x14000000 0 0x1000>;
#clock-cells = <1>;
diff --git a/Bindings/arm/mediatek/mediatek,pericfg.txt b/Bindings/arm/mediatek/mediatek,pericfg.txt
deleted file mode 100644
index ecf027a9003a..000000000000
--- a/Bindings/arm/mediatek/mediatek,pericfg.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-Mediatek pericfg controller
-===========================
-
-The Mediatek pericfg controller provides various clocks and reset
-outputs to the system.
-
-Required Properties:
-
-- compatible: Should be one of:
- - "mediatek,mt2701-pericfg", "syscon"
- - "mediatek,mt2712-pericfg", "syscon"
- - "mediatek,mt7622-pericfg", "syscon"
- - "mediatek,mt7623-pericfg", "mediatek,mt2701-pericfg", "syscon"
- - "mediatek,mt7629-pericfg", "syscon"
- - "mediatek,mt8135-pericfg", "syscon"
- - "mediatek,mt8173-pericfg", "syscon"
- - "mediatek,mt8183-pericfg", "syscon"
-- #clock-cells: Must be 1
-- #reset-cells: Must be 1
-
-The pericfg controller uses the common clk binding from
-Documentation/devicetree/bindings/clock/clock-bindings.txt
-The available clocks are defined in dt-bindings/clock/mt*-clk.h.
-Also it uses the common reset controller binding from
-Documentation/devicetree/bindings/reset/reset.txt.
-The available reset outputs are defined in
-dt-bindings/reset/mt*-resets.h
-
-Example:
-
-pericfg: power-controller@10003000 {
- compatible = "mediatek,mt8173-pericfg", "syscon";
- reg = <0 0x10003000 0 0x1000>;
- #clock-cells = <1>;
- #reset-cells = <1>;
-};
diff --git a/Bindings/arm/mediatek/mediatek,pericfg.yaml b/Bindings/arm/mediatek/mediatek,pericfg.yaml
new file mode 100644
index 000000000000..e271c4682ebc
--- /dev/null
+++ b/Bindings/arm/mediatek/mediatek,pericfg.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/arm/mediatek/mediatek,pericfg.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: MediaTek Peripheral Configuration Controller
+
+maintainers:
+ - Bartosz Golaszewski
+
+description:
+ The Mediatek pericfg controller provides various clocks and reset outputs
+ to the system.
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - mediatek,mt2701-pericfg
+ - mediatek,mt2712-pericfg
+ - mediatek,mt6765-pericfg
+ - mediatek,mt7622-pericfg
+ - mediatek,mt7629-pericfg
+ - mediatek,mt8135-pericfg
+ - mediatek,mt8173-pericfg
+ - mediatek,mt8183-pericfg
+ - mediatek,mt8516-pericfg
+ - const: syscon
+ - items:
+ # Special case for mt7623 for backward compatibility
+ - const: mediatek,mt7623-pericfg
+ - const: mediatek,mt2701-pericfg
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+ '#reset-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+
+examples:
+ - |
+ pericfg@10003000 {
+ compatible = "mediatek,mt8173-pericfg", "syscon";
+ reg = <0x10003000 0x1000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+
+ - |
+ pericfg@10003000 {
+ compatible = "mediatek,mt7623-pericfg", "mediatek,mt2701-pericfg", "syscon";
+ reg = <0x10003000 0x1000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
diff --git a/Bindings/arm/mediatek/mediatek,topckgen.txt b/Bindings/arm/mediatek/mediatek,topckgen.txt
index 0293d693ce0c..9b0394cbbdc9 100644
--- a/Bindings/arm/mediatek/mediatek,topckgen.txt
+++ b/Bindings/arm/mediatek/mediatek,topckgen.txt
@@ -8,6 +8,7 @@ Required Properties:
- compatible: Should be one of:
- "mediatek,mt2701-topckgen"
- "mediatek,mt2712-topckgen", "syscon"
+ - "mediatek,mt6765-topckgen", "syscon"
- "mediatek,mt6779-topckgen", "syscon"
- "mediatek,mt6797-topckgen"
- "mediatek,mt7622-topckgen"
diff --git a/Bindings/arm/mediatek/mediatek,vcodecsys.txt b/Bindings/arm/mediatek/mediatek,vcodecsys.txt
new file mode 100644
index 000000000000..c877bcc1a5c5
--- /dev/null
+++ b/Bindings/arm/mediatek/mediatek,vcodecsys.txt
@@ -0,0 +1,27 @@
+Mediatek vcodecsys controller
+============================
+
+The Mediatek vcodecsys controller provides various clocks to the system.
+
+Required Properties:
+
+- compatible: Should be one of:
+ - "mediatek,mt6765-vcodecsys", "syscon"
+- #clock-cells: Must be 1
+
+The vcodecsys controller uses the common clk binding from
+Documentation/devicetree/bindings/clock/clock-bindings.txt
+The available clocks are defined in dt-bindings/clock/mt*-clk.h.
+
+The vcodecsys controller also uses the common power domain from
+Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
+The available power doamins are defined in dt-bindings/power/mt*-power.h.
+
+Example:
+
+venc_gcon: clock-controller@17000000 {
+ compatible = "mediatek,mt6765-vcodecsys", "syscon";
+ reg = <0 0x17000000 0 0x10000>;
+ power-domains = <&scpsys MT6765_POWER_DOMAIN_VCODEC>;
+ #clock-cells = <1>;
+};
diff --git a/Bindings/arm/nxp/lpc32xx.yaml b/Bindings/arm/nxp/lpc32xx.yaml
index 07f39d3eee7e..f7f024910e71 100644
--- a/Bindings/arm/nxp/lpc32xx.yaml
+++ b/Bindings/arm/nxp/lpc32xx.yaml
@@ -17,9 +17,8 @@ properties:
- nxp,lpc3230
- nxp,lpc3240
- items:
- - enum:
- - ea,ea3250
- - phytec,phy3250
- - const: nxp,lpc3250
-
+ - enum:
+ - ea,ea3250
+ - phytec,phy3250
+ - const: nxp,lpc3250
...
diff --git a/Bindings/arm/psci.yaml b/Bindings/arm/psci.yaml
index 9247b58c26fc..8b77cf83a095 100644
--- a/Bindings/arm/psci.yaml
+++ b/Bindings/arm/psci.yaml
@@ -69,13 +69,11 @@ properties:
method:
description: The method of calling the PSCI firmware.
- allOf:
- - $ref: /schemas/types.yaml#/definitions/string-array
- - enum:
- # SMC #0, with the register assignments specified in this binding.
- - smc
- # HVC #0, with the register assignments specified in this binding.
- - hvc
+ $ref: /schemas/types.yaml#/definitions/string-array
+ enum:
+ - smc
+ # HVC #0, with the register assignments specified in this binding.
+ - hvc
cpu_suspend:
$ref: /schemas/types.yaml#/definitions/uint32
@@ -107,8 +105,8 @@ properties:
patternProperties:
"^power-domain-":
- allOf:
- - $ref: "../power/power-domain.yaml#"
+ $ref: "../power/power-domain.yaml#"
+
type: object
description: |
ARM systems can have multiple cores, sometimes in an hierarchical
diff --git a/Bindings/arm/qcom.yaml b/Bindings/arm/qcom.yaml
index 64ddae3bd39f..6031aee0f5a8 100644
--- a/Bindings/arm/qcom.yaml
+++ b/Bindings/arm/qcom.yaml
@@ -37,6 +37,8 @@ description: |
msm8994
msm8996
sc7180
+ sdm630
+ sdm660
sdm845
The 'board' element must be one of the following strings:
@@ -153,6 +155,11 @@ properties:
- qcom,sc7180-idp
- const: qcom,sc7180
+ - items:
+ - enum:
+ - xiaomi,lavender
+ - const: qcom,sdm660
+
- items:
- enum:
- qcom,ipq6018-cp01-c1
diff --git a/Bindings/arm/realtek.yaml b/Bindings/arm/realtek.yaml
index ab59de17152d..845f9c76d6f7 100644
--- a/Bindings/arm/realtek.yaml
+++ b/Bindings/arm/realtek.yaml
@@ -14,6 +14,13 @@ properties:
const: '/'
compatible:
oneOf:
+ # RTD1195 SoC based boards
+ - items:
+ - enum:
+ - mele,x1000 # MeLE X1000
+ - realtek,horseradish # Realtek Horseradish EVB
+ - const: realtek,rtd1195
+
# RTD1293 SoC based boards
- items:
- enum:
@@ -25,6 +32,7 @@ properties:
- enum:
- mele,v9 # MeLE V9
- probox2,ava # ProBox2 AVA
+ - xnano,x5 # Xnano X5
- zidoo,x9s # Zidoo X9S
- const: realtek,rtd1295
@@ -33,4 +41,17 @@ properties:
- enum:
- synology,ds418 # Synology DiskStation DS418
- const: realtek,rtd1296
+
+ # RTD1395 SoC based boards
+ - items:
+ - enum:
+ - bananapi,bpi-m4 # Banana Pi BPI-M4
+ - realtek,lion-skin # Realtek Lion Skin EVB
+ - const: realtek,rtd1395
+
+ # RTD1619 SoC based boards
+ - items:
+ - enum:
+ - realtek,mjolnir # Realtek Mjolnir EVB
+ - const: realtek,rtd1619
...
diff --git a/Bindings/arm/renesas,prr.yaml b/Bindings/arm/renesas,prr.yaml
index dd087643a9f8..1f80767da38b 100644
--- a/Bindings/arm/renesas,prr.yaml
+++ b/Bindings/arm/renesas,prr.yaml
@@ -33,5 +33,5 @@ examples:
- |
prr: chipid@ff000044 {
compatible = "renesas,prr";
- reg = <0 0xff000044 0 4>;
+ reg = <0xff000044 4>;
};
diff --git a/Bindings/arm/renesas.yaml b/Bindings/arm/renesas.yaml
index 611094d9186b..b7d2e921150a 100644
--- a/Bindings/arm/renesas.yaml
+++ b/Bindings/arm/renesas.yaml
@@ -54,6 +54,16 @@ properties:
- description: RZ/G1H (R8A77420)
items:
+ - enum:
+ # iWave Systems RZ/G1H Qseven System On Module (iW-RainboW-G21M-Qseven)
+ - iwave,g21m
+ - const: renesas,r8a7742
+
+ - items:
+ - enum:
+ # iWave Systems RZ/G1H Qseven Development Platform (iW-RainboW-G21D-Qseven)
+ - iwave,g21d
+ - const: iwave,g21m
- const: renesas,r8a7742
- description: RZ/G1M (R8A77430)
diff --git a/Bindings/arm/rockchip.yaml b/Bindings/arm/rockchip.yaml
index 715586dea9bb..d4a4045092df 100644
--- a/Bindings/arm/rockchip.yaml
+++ b/Bindings/arm/rockchip.yaml
@@ -358,6 +358,11 @@ properties:
- const: haoyu,marsboard-rk3066
- const: rockchip,rk3066a
+ - description: Hardkernel Odroid Go Advance
+ items:
+ - const: hardkernel,rk3326-odroid-go2
+ - const: rockchip,rk3326
+
- description: Hugsun X99 TV Box
items:
- const: hugsun,x99
diff --git a/Bindings/arm/samsung/exynos-chipid.yaml b/Bindings/arm/samsung/exynos-chipid.yaml
index 0425d333b50d..f99c0c6df21b 100644
--- a/Bindings/arm/samsung/exynos-chipid.yaml
+++ b/Bindings/arm/samsung/exynos-chipid.yaml
@@ -22,9 +22,8 @@ properties:
Adaptive Supply Voltage bin selection. This can be used
to determine the ASV bin of an SoC if respective information
is missing in the CHIPID registers or in the OTP memory.
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32
- - enum: [ 0, 1, 2, 3 ]
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2, 3]
required:
- compatible
diff --git a/Bindings/arm/samsung/samsung-boards.yaml b/Bindings/arm/samsung/samsung-boards.yaml
index 63acd57c4799..eb92f9eefaba 100644
--- a/Bindings/arm/samsung/samsung-boards.yaml
+++ b/Bindings/arm/samsung/samsung-boards.yaml
@@ -52,6 +52,7 @@ properties:
items:
- enum:
- insignal,origen # Insignal Origen
+ - samsung,i9100 # Samsung Galaxy S2 (GT-I9100)
- samsung,smdkv310 # Samsung SMDKV310 eval
- samsung,trats # Samsung Tizen Reference
- samsung,universal_c210 # Samsung C210
diff --git a/Bindings/arm/socionext/uniphier.yaml b/Bindings/arm/socionext/uniphier.yaml
index 65ad6d8a3c99..6caf1f9be390 100644
--- a/Bindings/arm/socionext/uniphier.yaml
+++ b/Bindings/arm/socionext/uniphier.yaml
@@ -17,45 +17,46 @@ properties:
- description: LD4 SoC boards
items:
- enum:
- - socionext,uniphier-ld4-ref
+ - socionext,uniphier-ld4-ref
- const: socionext,uniphier-ld4
- description: Pro4 SoC boards
items:
- enum:
- - socionext,uniphier-pro4-ace
- - socionext,uniphier-pro4-ref
- - socionext,uniphier-pro4-sanji
+ - socionext,uniphier-pro4-ace
+ - socionext,uniphier-pro4-ref
+ - socionext,uniphier-pro4-sanji
- const: socionext,uniphier-pro4
- description: sLD8 SoC boards
items:
- enum:
- - socionext,uniphier-sld8-ref
+ - socionext,uniphier-sld8-ref
- const: socionext,uniphier-sld8
- description: PXs2 SoC boards
items:
- enum:
- - socionext,uniphier-pxs2-gentil
- - socionext,uniphier-pxs2-vodka
+ - socionext,uniphier-pxs2-gentil
+ - socionext,uniphier-pxs2-vodka
- const: socionext,uniphier-pxs2
- description: LD6b SoC boards
items:
- enum:
- - socionext,uniphier-ld6b-ref
+ - socionext,uniphier-ld6b-ref
- const: socionext,uniphier-ld6b
- description: LD11 SoC boards
items:
- enum:
- - socionext,uniphier-ld11-global
- - socionext,uniphier-ld11-ref
+ - socionext,uniphier-ld11-global
+ - socionext,uniphier-ld11-ref
- const: socionext,uniphier-ld11
- description: LD20 SoC boards
items:
- enum:
- - socionext,uniphier-ld20-global
- - socionext,uniphier-ld20-ref
+ - socionext,uniphier-ld20-akebi96
+ - socionext,uniphier-ld20-global
+ - socionext,uniphier-ld20-ref
- const: socionext,uniphier-ld20
- description: PXs3 SoC boards
items:
- enum:
- - socionext,uniphier-pxs3-ref
+ - socionext,uniphier-pxs3-ref
- const: socionext,uniphier-pxs3
diff --git a/Bindings/arm/stm32/st,mlahb.yaml b/Bindings/arm/stm32/st,mlahb.yaml
index 55f7938c4826..9f276bc9efa0 100644
--- a/Bindings/arm/stm32/st,mlahb.yaml
+++ b/Bindings/arm/stm32/st,mlahb.yaml
@@ -20,7 +20,7 @@ description: |
[2]: https://wiki.st.com/stm32mpu/wiki/STM32MP15_RAM_mapping
allOf:
- - $ref: /schemas/simple-bus.yaml#
+ - $ref: /schemas/simple-bus.yaml#
properties:
compatible:
diff --git a/Bindings/arm/stm32/st,stm32-syscon.yaml b/Bindings/arm/stm32/st,stm32-syscon.yaml
index baff80197d5a..cf5db5e273f3 100644
--- a/Bindings/arm/stm32/st,stm32-syscon.yaml
+++ b/Bindings/arm/stm32/st,stm32-syscon.yaml
@@ -14,9 +14,9 @@ properties:
compatible:
oneOf:
- items:
- - enum:
- - st,stm32mp157-syscfg
- - const: syscon
+ - enum:
+ - st,stm32mp157-syscfg
+ - const: syscon
reg:
maxItems: 1
diff --git a/Bindings/arm/stm32/stm32.yaml b/Bindings/arm/stm32/stm32.yaml
index 1fcf306bd2d1..790e6dd48e34 100644
--- a/Bindings/arm/stm32/stm32.yaml
+++ b/Bindings/arm/stm32/stm32.yaml
@@ -38,6 +38,9 @@ properties:
- items:
- enum:
- arrow,stm32mp157a-avenger96 # Avenger96
+ - lxa,stm32mp157c-mc1
+ - shiratech,stm32mp157a-iot-box # IoT Box
+ - shiratech,stm32mp157a-stinger96 # Stinger96
- st,stm32mp157c-ed1
- st,stm32mp157a-dk1
- st,stm32mp157c-dk2
diff --git a/Bindings/arm/sunxi.yaml b/Bindings/arm/sunxi.yaml
index abf2d97fb7ae..87817ff0cd35 100644
--- a/Bindings/arm/sunxi.yaml
+++ b/Bindings/arm/sunxi.yaml
@@ -561,6 +561,11 @@ properties:
- const: olimex,a20-olinuxino-lime
- const: allwinner,sun7i-a20
+ - description: Olimex A20-OlinuXino LIME (with eMMC)
+ items:
+ - const: olimex,a20-olinuxino-lime-emmc
+ - const: allwinner,sun7i-a20
+
- description: Olimex A20-OlinuXino LIME2
items:
- const: olimex,a20-olinuxino-lime2
diff --git a/Bindings/arm/syna.txt b/Bindings/arm/syna.txt
index 2face46a5f64..d8b48f2edf1b 100644
--- a/Bindings/arm/syna.txt
+++ b/Bindings/arm/syna.txt
@@ -13,7 +13,7 @@ considered "unstable". Any Marvell Berlin device tree binding may change at any
time. Be sure to use a device tree binary and a kernel image generated from the
same source tree.
-Please refer to Documentation/devicetree/bindings/ABI.txt for a definition of a
+Please refer to Documentation/devicetree/bindings/ABI.rst for a definition of a
stable binding/ABI.
---------------------------------------------------------------
diff --git a/Bindings/arm/tegra/nvidia,tegra20-pmc.yaml b/Bindings/arm/tegra/nvidia,tegra20-pmc.yaml
index f17bb353f65e..b71a20af5f70 100644
--- a/Bindings/arm/tegra/nvidia,tegra20-pmc.yaml
+++ b/Bindings/arm/tegra/nvidia,tegra20-pmc.yaml
@@ -85,9 +85,8 @@ properties:
CPU power good signal from external PMIC to PMC is enabled.
nvidia,suspend-mode:
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32
- - enum: [0, 1, 2]
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2]
description:
The suspend mode that the platform should use.
Mode 0 is for LP0, CPU + Core voltage off and DRAM in self-refresh
@@ -323,7 +322,7 @@ examples:
tegra_pmc: pmc@7000e400 {
compatible = "nvidia,tegra210-pmc";
- reg = <0x0 0x7000e400 0x0 0x400>;
+ reg = <0x7000e400 0x400>;
clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>;
clock-names = "pclk", "clk32k_in";
#clock-cells = <1>;
diff --git a/Bindings/ata/faraday,ftide010.yaml b/Bindings/ata/faraday,ftide010.yaml
index bfc6357476fd..6451928dd2ce 100644
--- a/Bindings/ata/faraday,ftide010.yaml
+++ b/Bindings/ata/faraday,ftide010.yaml
@@ -26,8 +26,8 @@ properties:
oneOf:
- const: faraday,ftide010
- items:
- - const: cortina,gemini-pata
- - const: faraday,ftide010
+ - const: cortina,gemini-pata
+ - const: faraday,ftide010
reg:
maxItems: 1
diff --git a/Bindings/ata/renesas,rcar-sata.yaml b/Bindings/ata/renesas,rcar-sata.yaml
index 7b69831060d8..d06096a7ba4b 100644
--- a/Bindings/ata/renesas,rcar-sata.yaml
+++ b/Bindings/ata/renesas,rcar-sata.yaml
@@ -17,6 +17,7 @@ properties:
- renesas,sata-r8a7779 # R-Car H1
- items:
- enum:
+ - renesas,sata-r8a7742 # RZ/G1H
- renesas,sata-r8a7790-es1 # R-Car H2 ES1
- renesas,sata-r8a7790 # R-Car H2 other than ES1
- renesas,sata-r8a7791 # R-Car M2-W
diff --git a/Bindings/ata/sata_highbank.txt b/Bindings/ata/sata_highbank.txt
deleted file mode 100644
index aa83407cb7a4..000000000000
--- a/Bindings/ata/sata_highbank.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-* Calxeda AHCI SATA Controller
-
-SATA nodes are defined to describe on-chip Serial ATA controllers.
-The Calxeda SATA controller mostly conforms to the AHCI interface
-with some special extensions to add functionality.
-Each SATA controller should have its own node.
-
-Required properties:
-- compatible : compatible list, contains "calxeda,hb-ahci"
-- interrupts :
-- reg :
-
-Optional properties:
-- dma-coherent : Present if dma operations are coherent
-- calxeda,port-phys : phandle-combophy and lane assignment, which maps each
- SATA port to a combophy and a lane within that
- combophy
-- calxeda,sgpio-gpio: phandle-gpio bank, bit offset, and default on or off,
- which indicates that the driver supports SGPIO
- indicator lights using the indicated GPIOs
-- calxeda,led-order : a u32 array that map port numbers to offsets within the
- SGPIO bitstream.
-- calxeda,tx-atten : a u32 array that contains TX attenuation override
- codes, one per port. The upper 3 bytes are always
- 0 and thus ignored.
-- calxeda,pre-clocks : a u32 that indicates the number of additional clock
- cycles to transmit before sending an SGPIO pattern
-- calxeda,post-clocks: a u32 that indicates the number of additional clock
- cycles to transmit after sending an SGPIO pattern
-
-Example:
- sata@ffe08000 {
- compatible = "calxeda,hb-ahci";
- reg = <0xffe08000 0x1000>;
- interrupts = <115>;
- dma-coherent;
- calxeda,port-phys = <&combophy5 0 &combophy0 0 &combophy0 1
- &combophy0 2 &combophy0 3>;
- calxeda,sgpio-gpio =<&gpioh 5 1 &gpioh 6 1 &gpioh 7 1>;
- calxeda,led-order = <4 0 1 2 3>;
- calxeda,tx-atten = <0xff 22 0xff 0xff 23>;
- calxeda,pre-clocks = <10>;
- calxeda,post-clocks = <0>;
- };
diff --git a/Bindings/ata/sata_highbank.yaml b/Bindings/ata/sata_highbank.yaml
new file mode 100644
index 000000000000..5e2a2394e600
--- /dev/null
+++ b/Bindings/ata/sata_highbank.yaml
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/ata/sata_highbank.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Calxeda AHCI SATA Controller
+
+description: |
+ The Calxeda SATA controller mostly conforms to the AHCI interface
+ with some special extensions to add functionality, to map GPIOs for
+ activity LEDs and for mapping the ComboPHYs.
+
+maintainers:
+ - Andre Przywara
+
+properties:
+ compatible:
+ const: calxeda,hb-ahci
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ dma-coherent: true
+
+ calxeda,pre-clocks:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ Indicates the number of additional clock cycles to transmit before
+ sending an SGPIO pattern.
+
+ calxeda,post-clocks:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ Indicates the number of additional clock cycles to transmit after
+ sending an SGPIO pattern.
+
+ calxeda,led-order:
+ description: Maps port numbers to offsets within the SGPIO bitstream.
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 8
+
+ calxeda,port-phys:
+ description: |
+ phandle-combophy and lane assignment, which maps each SATA port to a
+ combophy and a lane within that combophy
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ minItems: 1
+ maxItems: 8
+
+ calxeda,tx-atten:
+ description: |
+ Contains TX attenuation override codes, one per port.
+ The upper 24 bits of each entry are always 0 and thus ignored.
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 8
+
+ calxeda,sgpio-gpio:
+ description: |
+ phandle-gpio bank, bit offset, and default on or off, which indicates
+ that the driver supports SGPIO indicator lights using the indicated
+ GPIOs.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ sata@ffe08000 {
+ compatible = "calxeda,hb-ahci";
+ reg = <0xffe08000 0x1000>;
+ interrupts = <115>;
+ dma-coherent;
+ calxeda,port-phys = <&combophy5 0>, <&combophy0 0>, <&combophy0 1>,
+ <&combophy0 2>, <&combophy0 3>;
+ calxeda,sgpio-gpio =<&gpioh 5 1>, <&gpioh 6 1>, <&gpioh 7 1>;
+ calxeda,led-order = <4 0 1 2 3>;
+ calxeda,tx-atten = <0xff 22 0xff 0xff 23>;
+ calxeda,pre-clocks = <10>;
+ calxeda,post-clocks = <0>;
+ };
+
+...
diff --git a/Bindings/auxdisplay/hit,hd44780.txt b/Bindings/auxdisplay/hit,hd44780.txt
deleted file mode 100644
index 2aa24b889923..000000000000
--- a/Bindings/auxdisplay/hit,hd44780.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-DT bindings for the Hitachi HD44780 Character LCD Controller
-
-The Hitachi HD44780 Character LCD Controller is commonly used on character LCDs
-that can display one or more lines of text. It exposes an M6800 bus interface,
-which can be used in either 4-bit or 8-bit mode.
-
-Required properties:
- - compatible: Must contain "hit,hd44780",
- - data-gpios: Must contain an array of either 4 or 8 GPIO specifiers,
- referring to the GPIO pins connected to the data signal lines DB0-DB7
- (8-bit mode) or DB4-DB7 (4-bit mode) of the LCD Controller's bus interface,
- - enable-gpios: Must contain a GPIO specifier, referring to the GPIO pin
- connected to the "E" (Enable) signal line of the LCD Controller's bus
- interface,
- - rs-gpios: Must contain a GPIO specifier, referring to the GPIO pin
- connected to the "RS" (Register Select) signal line of the LCD Controller's
- bus interface,
- - display-height-chars: Height of the display, in character cells,
- - display-width-chars: Width of the display, in character cells.
-
-Optional properties:
- - rw-gpios: Must contain a GPIO specifier, referring to the GPIO pin
- connected to the "RW" (Read/Write) signal line of the LCD Controller's bus
- interface,
- - backlight-gpios: Must contain a GPIO specifier, referring to the GPIO pin
- used for enabling the LCD's backlight,
- - internal-buffer-width: Internal buffer width (default is 40 for displays
- with 1 or 2 lines, and display-width-chars for displays with more than 2
- lines).
-
-Example:
-
- auxdisplay {
- compatible = "hit,hd44780";
-
- data-gpios = <&hc595 0 GPIO_ACTIVE_HIGH>,
- <&hc595 1 GPIO_ACTIVE_HIGH>,
- <&hc595 2 GPIO_ACTIVE_HIGH>,
- <&hc595 3 GPIO_ACTIVE_HIGH>;
- enable-gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
- rs-gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
-
- display-height-chars = <2>;
- display-width-chars = <16>;
- };
diff --git a/Bindings/auxdisplay/hit,hd44780.yaml b/Bindings/auxdisplay/hit,hd44780.yaml
new file mode 100644
index 000000000000..9222b06e93a0
--- /dev/null
+++ b/Bindings/auxdisplay/hit,hd44780.yaml
@@ -0,0 +1,96 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/auxdisplay/hit,hd44780.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hitachi HD44780 Character LCD Controller
+
+maintainers:
+ - Geert Uytterhoeven
+
+description:
+ The Hitachi HD44780 Character LCD Controller is commonly used on character
+ LCDs that can display one or more lines of text. It exposes an M6800 bus
+ interface, which can be used in either 4-bit or 8-bit mode.
+
+properties:
+ compatible:
+ const: hit,hd44780
+
+ data-gpios:
+ description:
+ GPIO pins connected to the data signal lines DB0-DB7 (8-bit mode) or
+ DB4-DB7 (4-bit mode) of the LCD Controller's bus interface.
+ oneOf:
+ - maxItems: 4
+ - maxItems: 8
+
+ enable-gpios:
+ description:
+ GPIO pin connected to the "E" (Enable) signal line of the LCD
+ Controller's bus interface.
+ maxItems: 1
+
+ rs-gpios:
+ description:
+ GPIO pin connected to the "RS" (Register Select) signal line of the LCD
+ Controller's bus interface.
+ maxItems: 1
+
+ rw-gpios:
+ description:
+ GPIO pin connected to the "RW" (Read/Write) signal line of the LCD
+ Controller's bus interface.
+ maxItems: 1
+
+ backlight-gpios:
+ description: GPIO pin used for enabling the LCD's backlight.
+ maxItems: 1
+
+ display-height-chars:
+ description: Height of the display, in character cells,
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 1
+ maximum: 4
+
+ display-width-chars:
+ description: Width of the display, in character cells.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 1
+ maximum: 64
+
+ internal-buffer-width:
+ description:
+ Internal buffer width (default is 40 for displays with 1 or 2 lines, and
+ display-width-chars for displays with more than 2 lines).
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 1
+ maximum: 64
+
+required:
+ - compatible
+ - data-gpios
+ - enable-gpios
+ - rs-gpios
+ - display-height-chars
+ - display-width-chars
+
+additionalProperties: false
+
+examples:
+ - |
+ #include
+ auxdisplay {
+ compatible = "hit,hd44780";
+
+ data-gpios = <&hc595 0 GPIO_ACTIVE_HIGH>,
+ <&hc595 1 GPIO_ACTIVE_HIGH>,
+ <&hc595 2 GPIO_ACTIVE_HIGH>,
+ <&hc595 3 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
+ rs-gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
+
+ display-height-chars = <2>;
+ display-width-chars = <16>;
+ };
diff --git a/Bindings/bus/allwinner,sun50i-a64-de2.yaml b/Bindings/bus/allwinner,sun50i-a64-de2.yaml
index f0b3d30fbb76..0503651cd214 100644
--- a/Bindings/bus/allwinner,sun50i-a64-de2.yaml
+++ b/Bindings/bus/allwinner,sun50i-a64-de2.yaml
@@ -31,12 +31,11 @@ properties:
maxItems: 1
allwinner,sram:
- allOf:
- - $ref: /schemas/types.yaml#definitions/phandle-array
- - maxItems: 1
description:
The SRAM that needs to be claimed to access the display engine
bus.
+ $ref: /schemas/types.yaml#definitions/phandle-array
+ maxItems: 1
ranges: true
diff --git a/Bindings/bus/allwinner,sun8i-a23-rsb.yaml b/Bindings/bus/allwinner,sun8i-a23-rsb.yaml
index 80973619342d..32d33b983d66 100644
--- a/Bindings/bus/allwinner,sun8i-a23-rsb.yaml
+++ b/Bindings/bus/allwinner,sun8i-a23-rsb.yaml
@@ -21,8 +21,8 @@ properties:
oneOf:
- const: allwinner,sun8i-a23-rsb
- items:
- - const: allwinner,sun8i-a83t-rsb
- - const: allwinner,sun8i-a23-rsb
+ - const: allwinner,sun8i-a83t-rsb
+ - const: allwinner,sun8i-a23-rsb
reg:
maxItems: 1
diff --git a/Bindings/bus/arm,integrator-ap-lm.yaml b/Bindings/bus/arm,integrator-ap-lm.yaml
new file mode 100644
index 000000000000..47227427c1c0
--- /dev/null
+++ b/Bindings/bus/arm,integrator-ap-lm.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/arm,integrator-ap-lm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Integrator/AP Logic Module extension bus
+
+maintainers:
+ - Linus Walleij
+
+description: The Integrator/AP is a prototyping platform and as such has a
+ site for stacking up to four logic modules (LM) designed specifically for
+ use with this platform. A special system controller register can be read to
+ determine if a logic module is connected at index 0, 1, 2 or 3. The logic
+ module connector is described in this binding. The logic modules per se
+ then have their own specific per-module bindings and they will be described
+ as subnodes under this logic module extension bus.
+
+properties:
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+ compatible:
+ items:
+ - const: arm,integrator-ap-lm
+
+ ranges: true
+ dma-ranges: true
+
+patternProperties:
+ "^bus(@[0-9a-f]*)?$":
+ description: Nodes on the Logic Module bus represent logic modules
+ and are named with bus. The first module is at 0xc0000000, the second
+ at 0xd0000000 and so on until the top of the memory of the system at
+ 0xffffffff. All information about the memory used by the module is
+ in ranges and dma-ranges.
+ type: object
+
+ required:
+ - compatible
+
+required:
+ - compatible
+
+examples:
+ - |
+ bus@c0000000 {
+ compatible = "arm,integrator-ap-lm";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0xc0000000 0xc0000000 0x40000000>;
+ dma-ranges;
+
+ bus@c0000000 {
+ compatible = "simple-bus";
+ ranges = <0x00000000 0xc0000000 0x10000000>;
+ /* The Logic Modules sees the Core Module 0 RAM @80000000 */
+ dma-ranges = <0x00000000 0x80000000 0x10000000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ serial@100000 {
+ compatible = "arm,pl011", "arm,primecell";
+ reg = <0x00100000 0x1000>;
+ interrupts-extended = <&impd1_vic 1>;
+ };
+
+ impd1_vic: interrupt-controller@3000000 {
+ compatible = "arm,pl192-vic";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ reg = <0x03000000 0x1000>;
+ valid-mask = <0x00000bff>;
+ interrupts-extended = <&pic 9>;
+ };
+ };
+ };
+
+additionalProperties: false
diff --git a/Bindings/bus/baikal,bt1-apb.yaml b/Bindings/bus/baikal,bt1-apb.yaml
new file mode 100644
index 000000000000..68b0131a31d0
--- /dev/null
+++ b/Bindings/bus/baikal,bt1-apb.yaml
@@ -0,0 +1,90 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/baikal,bt1-apb.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Baikal-T1 APB-bus
+
+maintainers:
+ - Serge Semin
+
+description: |
+ Baikal-T1 CPU or DMAC MMIO requests are handled by the AMBA 3 AXI Interconnect
+ which routes them to the AXI-APB bridge. This interface is a single master
+ multiple slaves bus in turn serializing IO accesses and routing them to the
+ addressed APB slave devices. In case of any APB protocol collisions, slave
+ device not responding on timeout an IRQ is raised with an erroneous address
+ reported to the APB terminator (APB Errors Handler Block).
+
+allOf:
+ - $ref: /schemas/simple-bus.yaml#
+
+properties:
+ compatible:
+ contains:
+ const: baikal,bt1-apb
+
+ reg:
+ items:
+ - description: APB EHB MMIO registers
+ - description: APB MMIO region with no any device mapped
+
+ reg-names:
+ items:
+ - const: ehb
+ - const: nodev
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: APB reference clock
+
+ clock-names:
+ items:
+ - const: pclk
+
+ resets:
+ items:
+ - description: APB domain reset line
+
+ reset-names:
+ items:
+ - const: prst
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts
+ - clocks
+ - clock-names
+
+examples:
+ - |
+ #include
+
+ bus@1f059000 {
+ compatible = "baikal,bt1-apb", "simple-bus";
+ reg = <0x1f059000 0x1000>,
+ <0x1d000000 0x2040000>;
+ reg-names = "ehb", "nodev";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ ranges;
+
+ interrupts = ;
+
+ clocks = <&ccu_sys 1>;
+ clock-names = "pclk";
+
+ resets = <&ccu_sys 1>;
+ reset-names = "prst";
+ };
+...
diff --git a/Bindings/bus/baikal,bt1-axi.yaml b/Bindings/bus/baikal,bt1-axi.yaml
new file mode 100644
index 000000000000..29e1aaea132b
--- /dev/null
+++ b/Bindings/bus/baikal,bt1-axi.yaml
@@ -0,0 +1,107 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/baikal,bt1-axi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Baikal-T1 AXI-bus
+
+maintainers:
+ - Serge Semin
+
+description: |
+ AXI3-bus is the main communication bus of Baikal-T1 SoC connecting all
+ high-speed peripheral IP-cores with RAM controller and with MIPS P5600
+ cores. Traffic arbitration is done by means of DW AXI Interconnect (so
+ called AXI Main Interconnect) routing IO requests from one block to
+ another: from CPU to SoC peripherals and between some SoC peripherals
+ (mostly between peripheral devices and RAM, but also between DMA and
+ some peripherals). In case of any protocol error, device not responding
+ an IRQ is raised and a faulty situation is reported to the AXI EHB
+ (Errors Handler Block) embedded on top of the DW AXI Interconnect and
+ accessible by means of the Baikal-T1 System Controller.
+
+allOf:
+ - $ref: /schemas/simple-bus.yaml#
+
+properties:
+ compatible:
+ contains:
+ const: baikal,bt1-axi
+
+ reg:
+ minItems: 1
+ items:
+ - description: Synopsys DesignWare AXI Interconnect QoS registers
+ - description: AXI EHB MMIO system controller registers
+
+ reg-names:
+ minItems: 1
+ items:
+ - const: qos
+ - const: ehb
+
+ '#interconnect-cells':
+ const: 1
+
+ syscon:
+ $ref: /schemas/types.yaml#definitions/phandle
+ description: Phandle to the Baikal-T1 System Controller DT node
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: Main Interconnect uplink reference clock
+
+ clock-names:
+ items:
+ - const: aclk
+
+ resets:
+ items:
+ - description: Main Interconnect reset line
+
+ reset-names:
+ items:
+ - const: arst
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - syscon
+ - interrupts
+ - clocks
+ - clock-names
+
+examples:
+ - |
+ #include
+
+ bus@1f05a000 {
+ compatible = "baikal,bt1-axi", "simple-bus";
+ reg = <0x1f05a000 0x1000>,
+ <0x1f04d110 0x8>;
+ reg-names = "qos", "ehb";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #interconnect-cells = <1>;
+
+ syscon = <&syscon>;
+
+ ranges;
+
+ interrupts = ;
+
+ clocks = <&ccu_axi 0>;
+ clock-names = "aclk";
+
+ resets = <&ccu_axi 0>;
+ reset-names = "arst";
+ };
+...
diff --git a/Bindings/bus/socionext,uniphier-system-bus.yaml b/Bindings/bus/socionext,uniphier-system-bus.yaml
index c4c9119e4a20..a0c6c5d2b70f 100644
--- a/Bindings/bus/socionext,uniphier-system-bus.yaml
+++ b/Bindings/bus/socionext,uniphier-system-bus.yaml
@@ -80,14 +80,14 @@ examples:
ranges = <1 0x00000000 0x42000000 0x02000000>,
<5 0x00000000 0x46000000 0x01000000>;
- ethernet@1,01f00000 {
+ ethernet@1,1f00000 {
compatible = "smsc,lan9115";
reg = <1 0x01f00000 0x1000>;
interrupts = <0 48 4>;
phy-mode = "mii";
};
- uart@5,00200000 {
+ serial@5,200000 {
compatible = "ns16550a";
reg = <5 0x00200000 0x20>;
interrupts = <0 49 4>;
diff --git a/Bindings/clock/allwinner,sun4i-a10-gates-clk.yaml b/Bindings/clock/allwinner,sun4i-a10-gates-clk.yaml
index ed1b2126a81b..9a37a357cb4e 100644
--- a/Bindings/clock/allwinner,sun4i-a10-gates-clk.yaml
+++ b/Bindings/clock/allwinner,sun4i-a10-gates-clk.yaml
@@ -52,12 +52,12 @@ properties:
- const: allwinner,sun4i-a10-dram-gates-clk
- items:
- - const: allwinner,sun5i-a13-dram-gates-clk
- - const: allwinner,sun4i-a10-gates-clk
+ - const: allwinner,sun5i-a13-dram-gates-clk
+ - const: allwinner,sun4i-a10-gates-clk
- items:
- - const: allwinner,sun8i-h3-apb0-gates-clk
- - const: allwinner,sun4i-a10-gates-clk
+ - const: allwinner,sun8i-h3-apb0-gates-clk
+ - const: allwinner,sun4i-a10-gates-clk
reg:
maxItems: 1
diff --git a/Bindings/clock/baikal,bt1-ccu-div.yaml b/Bindings/clock/baikal,bt1-ccu-div.yaml
new file mode 100644
index 000000000000..2821425ee445
--- /dev/null
+++ b/Bindings/clock/baikal,bt1-ccu-div.yaml
@@ -0,0 +1,188 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/baikal,bt1-ccu-div.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Baikal-T1 Clock Control Unit Dividers
+
+maintainers:
+ - Serge Semin
+
+description: |
+ Clocks Control Unit is the core of Baikal-T1 SoC System Controller
+ responsible for the chip subsystems clocking and resetting. The CCU is
+ connected with an external fixed rate oscillator, which signal is transformed
+ into clocks of various frequencies and then propagated to either individual
+ IP-blocks or to groups of blocks (clock domains). The transformation is done
+ by means of an embedded into CCU PLLs and gateable/non-gateable dividers. The
+ later ones are described in this binding. Each clock domain can be also
+ individually reset by using the domain clocks divider configuration
+ registers. Baikal-T1 CCU is logically divided into the next components:
+ 1) External oscillator (normally XTAL's 25 MHz crystal oscillator, but
+ in general can provide any frequency supported by the CCU PLLs).
+ 2) PLLs clocks generators (PLLs).
+ 3) AXI-bus clock dividers (AXI) - described in this binding file.
+ 4) System devices reference clock dividers (SYS) - described in this binding
+ file.
+ which are connected with each other as shown on the next figure:
+
+ +---------------+
+ | Baikal-T1 CCU |
+ | +----+------|- MIPS P5600 cores
+ | +-|PLLs|------|- DDR controller
+ | | +----+ |
+ +----+ | | | | |
+ |XTAL|--|-+ | | +---+-|
+ +----+ | | | +-|AXI|-|- AXI-bus
+ | | | +---+-|
+ | | | |
+ | | +----+---+-|- APB-bus
+ | +-------|SYS|-|- Low-speed Devices
+ | +---+-|- High-speed Devices
+ +---------------+
+
+ Each sub-block is represented as a separate DT node and has an individual
+ driver to be bound with.
+
+ In order to create signals of wide range frequencies the external oscillator
+ output is primarily connected to a set of CCU PLLs. Some of PLLs CLKOUT are
+ then passed over CCU dividers to create signals required for the target clock
+ domain (like AXI-bus or System Device consumers). The dividers have the
+ following structure:
+
+ +--------------+
+ CLKIN --|->+----+ 1|\ |
+ SETCLK--|--|/DIV|->| | |
+ CLKDIV--|--| | | |-|->CLKLOUT
+ LOCK----|--+----+ | | |
+ | |/ |
+ | | |
+ EN------|-----------+ |
+ RST-----|--------------|->RSTOUT
+ +--------------+
+
+ where CLKIN is the reference clock coming either from CCU PLLs or from an
+ external clock oscillator, SETCLK - a command to update the output clock in
+ accordance with a set divider, CLKDIV - clocks divider, LOCK - a signal of
+ the output clock stabilization, EN - enable/disable the divider block,
+ RST/RSTOUT - reset clocks domain signal. Depending on the consumer IP-core
+ peculiarities the dividers may lack of some functionality depicted on the
+ figure above (like EN, CLKDIV/LOCK/SETCLK). In this case the corresponding
+ clock provider just doesn't expose either switching functions, or the rate
+ configuration, or both of them.
+
+ The clock dividers, which output clock is then consumed by the SoC individual
+ devices, are united into a single clocks provider called System Devices CCU.
+ Similarly the dividers with output clocks utilized as AXI-bus reference clocks
+ are called AXI-bus CCU. Both of them use the common clock bindings with no
+ custom properties. The list of exported clocks and reset signals can be found
+ in the files: 'include/dt-bindings/clock/bt1-ccu.h' and
+ 'include/dt-bindings/reset/bt1-ccu.h'. Since System Devices and AXI-bus CCU
+ are a part of the Baikal-T1 SoC System Controller their DT nodes are supposed
+ to be a children of later one.
+
+if:
+ properties:
+ compatible:
+ contains:
+ const: baikal,bt1-ccu-axi
+
+then:
+ properties:
+ clocks:
+ items:
+ - description: CCU SATA PLL output clock
+ - description: CCU PCIe PLL output clock
+ - description: CCU Ethernet PLL output clock
+
+ clock-names:
+ items:
+ - const: sata_clk
+ - const: pcie_clk
+ - const: eth_clk
+
+else:
+ properties:
+ clocks:
+ items:
+ - description: External reference clock
+ - description: CCU SATA PLL output clock
+ - description: CCU PCIe PLL output clock
+ - description: CCU Ethernet PLL output clock
+
+ clock-names:
+ items:
+ - const: ref_clk
+ - const: sata_clk
+ - const: pcie_clk
+ - const: eth_clk
+
+properties:
+ compatible:
+ enum:
+ - baikal,bt1-ccu-axi
+ - baikal,bt1-ccu-sys
+
+ reg:
+ maxItems: 1
+
+ "#clock-cells":
+ const: 1
+
+ "#reset-cells":
+ const: 1
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - "#clock-cells"
+ - clocks
+ - clock-names
+
+examples:
+ # AXI-bus Clock Control Unit node:
+ - |
+ #include
+
+ clock-controller@1f04d030 {
+ compatible = "baikal,bt1-ccu-axi";
+ reg = <0x1f04d030 0x030>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+
+ clocks = <&ccu_pll CCU_SATA_PLL>,
+ <&ccu_pll CCU_PCIE_PLL>,
+ <&ccu_pll CCU_ETH_PLL>;
+ clock-names = "sata_clk", "pcie_clk", "eth_clk";
+ };
+ # System Devices Clock Control Unit node:
+ - |
+ #include
+
+ clock-controller@1f04d060 {
+ compatible = "baikal,bt1-ccu-sys";
+ reg = <0x1f04d060 0x0a0>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+
+ clocks = <&clk25m>,
+ <&ccu_pll CCU_SATA_PLL>,
+ <&ccu_pll CCU_PCIE_PLL>,
+ <&ccu_pll CCU_ETH_PLL>;
+ clock-names = "ref_clk", "sata_clk", "pcie_clk",
+ "eth_clk";
+ };
+ # Required Clock Control Unit PLL node:
+ - |
+ ccu_pll: clock-controller@1f04d000 {
+ compatible = "baikal,bt1-ccu-pll";
+ reg = <0x1f04d000 0x028>;
+ #clock-cells = <1>;
+
+ clocks = <&clk25m>;
+ clock-names = "ref_clk";
+ };
+...
diff --git a/Bindings/clock/baikal,bt1-ccu-pll.yaml b/Bindings/clock/baikal,bt1-ccu-pll.yaml
new file mode 100644
index 000000000000..97131bfa6f87
--- /dev/null
+++ b/Bindings/clock/baikal,bt1-ccu-pll.yaml
@@ -0,0 +1,131 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/baikal,bt1-ccu-pll.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Baikal-T1 Clock Control Unit PLL
+
+maintainers:
+ - Serge Semin
+
+description: |
+ Clocks Control Unit is the core of Baikal-T1 SoC System Controller
+ responsible for the chip subsystems clocking and resetting. The CCU is
+ connected with an external fixed rate oscillator, which signal is transformed
+ into clocks of various frequencies and then propagated to either individual
+ IP-blocks or to groups of blocks (clock domains). The transformation is done
+ by means of PLLs and gateable/non-gateable dividers embedded into the CCU.
+ It's logically divided into the next components:
+ 1) External oscillator (normally XTAL's 25 MHz crystal oscillator, but
+ in general can provide any frequency supported by the CCU PLLs).
+ 2) PLLs clocks generators (PLLs) - described in this binding file.
+ 3) AXI-bus clock dividers (AXI).
+ 4) System devices reference clock dividers (SYS).
+ which are connected with each other as shown on the next figure:
+
+ +---------------+
+ | Baikal-T1 CCU |
+ | +----+------|- MIPS P5600 cores
+ | +-|PLLs|------|- DDR controller
+ | | +----+ |
+ +----+ | | | | |
+ |XTAL|--|-+ | | +---+-|
+ +----+ | | | +-|AXI|-|- AXI-bus
+ | | | +---+-|
+ | | | |
+ | | +----+---+-|- APB-bus
+ | +-------|SYS|-|- Low-speed Devices
+ | +---+-|- High-speed Devices
+ +---------------+
+
+ Each CCU sub-block is represented as a separate dts-node and has an
+ individual driver to be bound with.
+
+ In order to create signals of wide range frequencies the external oscillator
+ output is primarily connected to a set of CCU PLLs. There are five PLLs
+ to create a clock for the MIPS P5600 cores, the embedded DDR controller,
+ SATA, Ethernet and PCIe domains. The last three domains though named by the
+ biggest system interfaces in fact include nearly all of the rest SoC
+ peripherals. Each of the PLLs is based on True Circuits TSMC CLN28HPM core
+ with an interface wrapper (so called safe PLL' clocks switcher) to simplify
+ the PLL configuration procedure. The PLLs work as depicted on the next
+ diagram:
+
+ +--------------------------+
+ | |
+ +-->+---+ +---+ +---+ | +---+ 0|\
+ CLKF--->|/NF|--->|PFD|...|VCO|-+->|/OD|--->| |
+ +---+ +->+---+ +---+ /->+---+ | |--->CLKOUT
+ CLKOD---------C----------------+ 1| |
+ +--------C--------------------------->|/
+ | | ^
+ Rclk-+->+---+ | |
+ CLKR--->|/NR|-+ |
+ +---+ |
+ BYPASS--------------------------------------+
+ BWADJ--->
+
+ where Rclk is the reference clock coming from XTAL, NR - reference clock
+ divider, NF - PLL clock multiplier, OD - VCO output clock divider, CLKOUT -
+ output clock, BWADJ is the PLL bandwidth adjustment parameter. At this moment
+ the binding supports the PLL dividers configuration in accordance with a
+ requested rate, while bypassing and bandwidth adjustment settings can be
+ added in future if it gets to be necessary.
+
+ The PLLs CLKOUT is then either directly connected with the corresponding
+ clocks consumer (like P5600 cores or DDR controller) or passed over a CCU
+ divider to create a signal required for the clock domain.
+
+ The CCU PLL dts-node uses the common clock bindings with no custom
+ parameters. The list of exported clocks can be found in
+ 'include/dt-bindings/clock/bt1-ccu.h'. Since CCU PLL is a part of the
+ Baikal-T1 SoC System Controller its DT node is supposed to be a child of
+ later one.
+
+properties:
+ compatible:
+ const: baikal,bt1-ccu-pll
+
+ reg:
+ maxItems: 1
+
+ "#clock-cells":
+ const: 1
+
+ clocks:
+ description: External reference clock
+ maxItems: 1
+
+ clock-names:
+ const: ref_clk
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - "#clock-cells"
+ - clocks
+ - clock-names
+
+examples:
+ # Clock Control Unit PLL node:
+ - |
+ clock-controller@1f04d000 {
+ compatible = "baikal,bt1-ccu-pll";
+ reg = <0x1f04d000 0x028>;
+ #clock-cells = <1>;
+
+ clocks = <&clk25m>;
+ clock-names = "ref_clk";
+ };
+ # Required external oscillator:
+ - |
+ clk25m: clock-oscillator-25m {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <25000000>;
+ clock-output-names = "clk25m";
+ };
+...
diff --git a/Bindings/clock/bitmain,bm1880-clk.yaml b/Bindings/clock/bitmain,bm1880-clk.yaml
index 8559fe8f7efd..228c9313df53 100644
--- a/Bindings/clock/bitmain,bm1880-clk.yaml
+++ b/Bindings/clock/bitmain,bm1880-clk.yaml
@@ -65,7 +65,7 @@ examples:
- |
uart0: serial@58018000 {
compatible = "snps,dw-apb-uart";
- reg = <0x0 0x58018000 0x0 0x2000>;
+ reg = <0x58018000 0x2000>;
clocks = <&clk 45>, <&clk 46>;
clock-names = "baudclk", "apb_pclk";
interrupts = <0 9 4>;
diff --git a/Bindings/clock/calxeda.txt b/Bindings/clock/calxeda.txt
deleted file mode 100644
index 0a6ac1bdcda1..000000000000
--- a/Bindings/clock/calxeda.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Device Tree Clock bindings for Calxeda highbank platform
-
-This binding uses the common clock binding[1].
-
-[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-
-Required properties:
-- compatible : shall be one of the following:
- "calxeda,hb-pll-clock" - for a PLL clock
- "calxeda,hb-a9periph-clock" - The A9 peripheral clock divided from the
- A9 clock.
- "calxeda,hb-a9bus-clock" - The A9 bus clock divided from the A9 clock.
- "calxeda,hb-emmc-clock" - Divided clock for MMC/SD controller.
-- reg : shall be the control register offset from SYSREGs base for the clock.
-- clocks : shall be the input parent clock phandle for the clock. This is
- either an oscillator or a pll output.
-- #clock-cells : from common clock binding; shall be set to 0.
diff --git a/Bindings/clock/calxeda.yaml b/Bindings/clock/calxeda.yaml
new file mode 100644
index 000000000000..a34cbf3c9aaf
--- /dev/null
+++ b/Bindings/clock/calxeda.yaml
@@ -0,0 +1,82 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/calxeda.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Device Tree Clock bindings for Calxeda highbank platform
+
+description: |
+ This binding covers the Calxeda SoC internal peripheral and bus clocks
+ as used by peripherals. The clocks live inside the "system register"
+ region of the SoC, so are typically presented as children of an
+ "hb-sregs" node.
+
+maintainers:
+ - Andre Przywara
+
+properties:
+ "#clock-cells":
+ const: 0
+
+ compatible:
+ enum:
+ - calxeda,hb-pll-clock
+ - calxeda,hb-a9periph-clock
+ - calxeda,hb-a9bus-clock
+ - calxeda,hb-emmc-clock
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - "#clock-cells"
+ - compatible
+ - clocks
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ sregs@3fffc000 {
+ compatible = "calxeda,hb-sregs";
+ reg = <0x3fffc000 0x1000>;
+
+ clocks {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ osc: oscillator {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <33333000>;
+ };
+
+ ddrpll: ddrpll@108 {
+ #clock-cells = <0>;
+ compatible = "calxeda,hb-pll-clock";
+ clocks = <&osc>;
+ reg = <0x108>;
+ };
+
+ a9pll: a9pll@100 {
+ #clock-cells = <0>;
+ compatible = "calxeda,hb-pll-clock";
+ clocks = <&osc>;
+ reg = <0x100>;
+ };
+
+ a9periphclk: a9periphclk@104 {
+ #clock-cells = <0>;
+ compatible = "calxeda,hb-a9periph-clock";
+ clocks = <&a9pll>;
+ reg = <0x104>;
+ };
+ };
+ };
+
+...
diff --git a/Bindings/clock/cirrus,lochnagar.txt b/Bindings/clock/cirrus,lochnagar.txt
deleted file mode 100644
index 52a064c789ee..000000000000
--- a/Bindings/clock/cirrus,lochnagar.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-Cirrus Logic Lochnagar Audio Development Board
-
-Lochnagar is an evaluation and development board for Cirrus Logic
-Smart CODEC and Amp devices. It allows the connection of most Cirrus
-Logic devices on mini-cards, as well as allowing connection of
-various application processor systems to provide a full evaluation
-platform. Audio system topology, clocking and power can all be
-controlled through the Lochnagar, allowing the device under test
-to be used in a variety of possible use cases.
-
-This binding document describes the binding for the clock portion of
-the driver.
-
-Also see these documents for generic binding information:
- [1] Clock : ../clock/clock-bindings.txt
-
-And these for relevant defines:
- [2] include/dt-bindings/clock/lochnagar.h
-
-This binding must be part of the Lochnagar MFD binding:
- [3] ../mfd/cirrus,lochnagar.txt
-
-Required properties:
-
- - compatible : One of the following strings:
- "cirrus,lochnagar1-clk"
- "cirrus,lochnagar2-clk"
-
- - #clock-cells : Must be 1. The first cell indicates the clock
- number, see [2] for available clocks and [1].
-
-Optional properties:
-
- - clocks : Must contain an entry for each clock in clock-names.
- - clock-names : May contain entries for each of the following
- clocks:
- - ln-cdc-clkout : Output clock from CODEC card.
- - ln-dsp-clkout : Output clock from DSP card.
- - ln-gf-mclk1,ln-gf-mclk2,ln-gf-mclk3,ln-gf-mclk4 : Optional
- input audio clocks from host system.
- - ln-psia1-mclk, ln-psia2-mclk : Optional input audio clocks from
- external connector.
- - ln-spdif-mclk : Optional input audio clock from SPDIF.
- - ln-spdif-clkout : Optional input audio clock from SPDIF.
- - ln-adat-mclk : Optional input audio clock from ADAT.
- - ln-pmic-32k : On board fixed clock.
- - ln-clk-12m : On board fixed clock.
- - ln-clk-11m : On board fixed clock.
- - ln-clk-24m : On board fixed clock.
- - ln-clk-22m : On board fixed clock.
- - ln-clk-8m : On board fixed clock.
- - ln-usb-clk-24m : On board fixed clock.
- - ln-usb-clk-12m : On board fixed clock.
-
- - assigned-clocks : A list of Lochnagar clocks to be reparented, see
- [2] for available clocks.
- - assigned-clock-parents : Parents to be assigned to the clocks
- listed in "assigned-clocks".
-
-Optional nodes:
-
- - fixed-clock nodes may be registered for the following on board clocks:
- - ln-pmic-32k : 32768 Hz
- - ln-clk-12m : 12288000 Hz
- - ln-clk-11m : 11298600 Hz
- - ln-clk-24m : 24576000 Hz
- - ln-clk-22m : 22579200 Hz
- - ln-clk-8m : 8192000 Hz
- - ln-usb-clk-24m : 24576000 Hz
- - ln-usb-clk-12m : 12288000 Hz
-
-Example:
-
-lochnagar {
- lochnagar-clk {
- compatible = "cirrus,lochnagar2-clk";
-
- #clock-cells = <1>;
-
- clocks = <&clk-audio>, <&clk_pmic>;
- clock-names = "ln-gf-mclk2", "ln-pmic-32k";
-
- assigned-clocks = <&lochnagar-clk LOCHNAGAR_CDC_MCLK1>,
- <&lochnagar-clk LOCHNAGAR_CDC_MCLK2>;
- assigned-clock-parents = <&clk-audio>,
- <&clk-pmic>;
- };
-
- clk-pmic: clk-pmic {
- compatible = "fixed-clock";
- clock-cells = <0>;
- clock-frequency = <32768>;
- };
-};
diff --git a/Bindings/clock/cirrus,lochnagar.yaml b/Bindings/clock/cirrus,lochnagar.yaml
new file mode 100644
index 000000000000..59de125647ec
--- /dev/null
+++ b/Bindings/clock/cirrus,lochnagar.yaml
@@ -0,0 +1,78 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/cirrus,lochnagar.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus Logic Lochnagar Audio Development Board
+
+maintainers:
+ - patches@opensource.cirrus.com
+
+description: |
+ Lochnagar is an evaluation and development board for Cirrus Logic
+ Smart CODEC and Amp devices. It allows the connection of most Cirrus
+ Logic devices on mini-cards, as well as allowing connection of various
+ application processor systems to provide a full evaluation platform.
+ Audio system topology, clocking and power can all be controlled through
+ the Lochnagar, allowing the device under test to be used in a variety of
+ possible use cases.
+
+ This binding document describes the binding for the clock portion of the
+ driver.
+
+ Also see these documents for generic binding information:
+ [1] Clock : ../clock/clock-bindings.txt
+
+ And these for relevant defines:
+ [2] include/dt-bindings/clock/lochnagar.h
+
+ This binding must be part of the Lochnagar MFD binding:
+ [3] ../mfd/cirrus,lochnagar.yaml
+
+properties:
+ compatible:
+ enum:
+ - cirrus,lochnagar1-clk
+ - cirrus,lochnagar2-clk
+
+ '#clock-cells':
+ description:
+ The first cell indicates the clock number, see [2] for available
+ clocks and [1].
+ const: 1
+
+ clock-names:
+ items:
+ enum:
+ - ln-cdc-clkout # Output clock from CODEC card.
+ - ln-dsp-clkout # Output clock from DSP card.
+ - ln-gf-mclk1 # Optional input clock from host system.
+ - ln-gf-mclk2 # Optional input clock from host system.
+ - ln-gf-mclk3 # Optional input clock from host system.
+ - ln-gf-mclk4 # Optional input clock from host system.
+ - ln-psia1-mclk # Optional input clock from external connector.
+ - ln-psia2-mclk # Optional input clock from external connector.
+ - ln-spdif-mclk # Optional input clock from SPDIF.
+ - ln-spdif-clkout # Optional input clock from SPDIF.
+ - ln-adat-mclk # Optional input clock from ADAT.
+ - ln-pmic-32k # On board fixed clock.
+ - ln-clk-12m # On board fixed clock.
+ - ln-clk-11m # On board fixed clock.
+ - ln-clk-24m # On board fixed clock.
+ - ln-clk-22m # On board fixed clock.
+ - ln-clk-8m # On board fixed clock.
+ - ln-usb-clk-24m # On board fixed clock.
+ - ln-usb-clk-12m # On board fixed clock.
+ minItems: 1
+ maxItems: 19
+
+ clocks: true
+ assigned-clocks: true
+ assigned-clock-parents: true
+
+additionalProperties: false
+
+required:
+ - compatible
+ - '#clock-cells'
diff --git a/Bindings/clock/fixed-factor-clock.yaml b/Bindings/clock/fixed-factor-clock.yaml
index b567f8092f8c..f415845b38dd 100644
--- a/Bindings/clock/fixed-factor-clock.yaml
+++ b/Bindings/clock/fixed-factor-clock.yaml
@@ -24,9 +24,8 @@ properties:
clock-div:
description: Fixed divider
- allOf:
- - $ref: /schemas/types.yaml#/definitions/uint32
- - minimum: 1
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 1
clock-mult:
description: Fixed multiplier
diff --git a/Bindings/clock/fsl,plldig.yaml b/Bindings/clock/fsl,plldig.yaml
index a203d5d498db..9ac716dfa602 100644
--- a/Bindings/clock/fsl,plldig.yaml
+++ b/Bindings/clock/fsl,plldig.yaml
@@ -28,15 +28,14 @@ properties:
const: 0
fsl,vco-hz:
- description: Optional for VCO frequency of the PLL in Hertz.
- The VCO frequency of this PLL cannot be changed during runtime
- only at startup. Therefore, the output frequencies are very
- limited and might not even closely match the requested frequency.
- To work around this restriction the user may specify its own
- desired VCO frequency for the PLL.
- minimum: 650000000
- maximum: 1300000000
- default: 1188000000
+ description: Optional for VCO frequency of the PLL in Hertz. The VCO frequency
+ of this PLL cannot be changed during runtime only at startup. Therefore,
+ the output frequencies are very limited and might not even closely match
+ the requested frequency. To work around this restriction the user may specify
+ its own desired VCO frequency for the PLL.
+ minimum: 650000000
+ maximum: 1300000000
+ default: 1188000000
required:
- compatible
@@ -51,7 +50,7 @@ examples:
- |
dpclk: clock-display@f1f0000 {
compatible = "fsl,ls1028a-plldig";
- reg = <0x0 0xf1f0000 0x0 0xffff>;
+ reg = <0xf1f0000 0xffff>;
#clock-cells = <0>;
clocks = <&osc_27m>;
};
diff --git a/Bindings/clock/idt,versaclock5.txt b/Bindings/clock/idt,versaclock5.txt
index 05a245c9df08..bcff681a4bd0 100644
--- a/Bindings/clock/idt,versaclock5.txt
+++ b/Bindings/clock/idt,versaclock5.txt
@@ -12,6 +12,7 @@ Required properties:
"idt,5p49v5933"
"idt,5p49v5935"
"idt,5p49v6901"
+ "idt,5p49v6965"
- reg: i2c device address, shall be 0x68 or 0x6a.
- #clock-cells: from common clock binding; shall be set to 1.
- clocks: from common clock binding; list of parent clock handles,
diff --git a/Bindings/clock/imx1-clock.txt b/Bindings/clock/imx1-clock.txt
deleted file mode 100644
index 9823baf7acb6..000000000000
--- a/Bindings/clock/imx1-clock.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-* Clock bindings for Freescale i.MX1 CPUs
-
-Required properties:
-- compatible: Should be "fsl,imx1-ccm".
-- reg: Address and length of the register set.
-- #clock-cells: Should be <1>.
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx1-clock.h
-for the full list of i.MX1 clock IDs.
-
-Examples:
- clks: ccm@21b000 {
- #clock-cells = <1>;
- compatible = "fsl,imx1-ccm";
- reg = <0x0021b000 0x1000>;
- };
-
- pwm: pwm@208000 {
- #pwm-cells = <2>;
- compatible = "fsl,imx1-pwm";
- reg = <0x00208000 0x1000>;
- interrupts = <34>;
- clocks = <&clks IMX1_CLK_DUMMY>, <&clks IMX1_CLK_PER1>;
- clock-names = "ipg", "per";
- };
diff --git a/Bindings/clock/imx1-clock.yaml b/Bindings/clock/imx1-clock.yaml
new file mode 100644
index 000000000000..f4833a29b79e
--- /dev/null
+++ b/Bindings/clock/imx1-clock.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx1-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX1 CPUs
+
+maintainers:
+ - Alexander Shiyan
+
+description: |
+ The clock consumer should specify the desired clock by having the clock
+ ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx1-clock.h
+ for the full list of i.MX1 clock IDs.
+
+properties:
+ compatible:
+ const: fsl,imx1-ccm
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include
+
+ clock-controller@21b000 {
+ #clock-cells = <1>;
+ compatible = "fsl,imx1-ccm";
+ reg = <0x0021b000 0x1000>;
+ };
+
+ pwm@208000 {
+ #pwm-cells = <2>;
+ compatible = "fsl,imx1-pwm";
+ reg = <0x00208000 0x1000>;
+ interrupts = <34>;
+ clocks = <&clks IMX1_CLK_DUMMY>, <&clks IMX1_CLK_PER1>;
+ clock-names = "ipg", "per";
+ };
diff --git a/Bindings/clock/imx21-clock.txt b/Bindings/clock/imx21-clock.txt
deleted file mode 100644
index 806f63d628bd..000000000000
--- a/Bindings/clock/imx21-clock.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-* Clock bindings for Freescale i.MX21
-
-Required properties:
-- compatible : Should be "fsl,imx21-ccm".
-- reg : Address and length of the register set.
-- interrupts : Should contain CCM interrupt.
-- #clock-cells: Should be <1>.
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx21-clock.h
-for the full list of i.MX21 clock IDs.
-
-Examples:
- clks: ccm@10027000{
- compatible = "fsl,imx21-ccm";
- reg = <0x10027000 0x800>;
- #clock-cells = <1>;
- };
-
- uart1: serial@1000a000 {
- compatible = "fsl,imx21-uart";
- reg = <0x1000a000 0x1000>;
- interrupts = <20>;
- clocks = <&clks IMX21_CLK_UART1_IPG_GATE>,
- <&clks IMX21_CLK_PER1>;
- clock-names = "ipg", "per";
- };
diff --git a/Bindings/clock/imx21-clock.yaml b/Bindings/clock/imx21-clock.yaml
new file mode 100644
index 000000000000..518ad9a4733c
--- /dev/null
+++ b/Bindings/clock/imx21-clock.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx21-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX21
+
+maintainers:
+ - Alexander Shiyan
+
+description: |
+ The clock consumer should specify the desired clock by having the clock
+ ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx21-clock.h
+ for the full list of i.MX21 clock IDs.
+
+properties:
+ compatible:
+ const: fsl,imx21-ccm
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include
+
+ clock-controller@10027000 {
+ compatible = "fsl,imx21-ccm";
+ reg = <0x10027000 0x800>;
+ #clock-cells = <1>;
+ };
+
+ serial@1000a000 {
+ compatible = "fsl,imx21-uart";
+ reg = <0x1000a000 0x1000>;
+ interrupts = <20>;
+ clocks = <&clks IMX21_CLK_UART1_IPG_GATE>,
+ <&clks IMX21_CLK_PER1>;
+ clock-names = "ipg", "per";
+ };
diff --git a/Bindings/clock/imx23-clock.txt b/Bindings/clock/imx23-clock.txt
deleted file mode 100644
index 8385348d3bd9..000000000000
--- a/Bindings/clock/imx23-clock.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-* Clock bindings for Freescale i.MX23
-
-Required properties:
-- compatible: Should be "fsl,imx23-clkctrl"
-- reg: Address and length of the register set
-- #clock-cells: Should be <1>
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. The following is a full list of i.MX23
-clocks and IDs.
-
- Clock ID
- ------------------
- ref_xtal 0
- pll 1
- ref_cpu 2
- ref_emi 3
- ref_pix 4
- ref_io 5
- saif_sel 6
- lcdif_sel 7
- gpmi_sel 8
- ssp_sel 9
- emi_sel 10
- cpu 11
- etm_sel 12
- cpu_pll 13
- cpu_xtal 14
- hbus 15
- xbus 16
- lcdif_div 17
- ssp_div 18
- gpmi_div 19
- emi_pll 20
- emi_xtal 21
- etm_div 22
- saif_div 23
- clk32k_div 24
- rtc 25
- adc 26
- spdif_div 27
- clk32k 28
- dri 29
- pwm 30
- filt 31
- uart 32
- ssp 33
- gpmi 34
- spdif 35
- emi 36
- saif 37
- lcdif 38
- etm 39
- usb 40
- usb_phy 41
-
-Examples:
-
-clks: clkctrl@80040000 {
- compatible = "fsl,imx23-clkctrl";
- reg = <0x80040000 0x2000>;
- #clock-cells = <1>;
-};
-
-auart0: serial@8006c000 {
- compatible = "fsl,imx23-auart";
- reg = <0x8006c000 0x2000>;
- interrupts = <24 25 23>;
- clocks = <&clks 32>;
-};
diff --git a/Bindings/clock/imx23-clock.yaml b/Bindings/clock/imx23-clock.yaml
new file mode 100644
index 000000000000..66cb238a1040
--- /dev/null
+++ b/Bindings/clock/imx23-clock.yaml
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx23-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX23
+
+maintainers:
+ - Shawn Guo
+
+description: |
+ The clock consumer should specify the desired clock by having the clock
+ ID in its "clocks" phandle cell. The following is a full list of i.MX23
+ clocks and IDs.
+
+ Clock ID
+ ------------------
+ ref_xtal 0
+ pll 1
+ ref_cpu 2
+ ref_emi 3
+ ref_pix 4
+ ref_io 5
+ saif_sel 6
+ lcdif_sel 7
+ gpmi_sel 8
+ ssp_sel 9
+ emi_sel 10
+ cpu 11
+ etm_sel 12
+ cpu_pll 13
+ cpu_xtal 14
+ hbus 15
+ xbus 16
+ lcdif_div 17
+ ssp_div 18
+ gpmi_div 19
+ emi_pll 20
+ emi_xtal 21
+ etm_div 22
+ saif_div 23
+ clk32k_div 24
+ rtc 25
+ adc 26
+ spdif_div 27
+ clk32k 28
+ dri 29
+ pwm 30
+ filt 31
+ uart 32
+ ssp 33
+ gpmi 34
+ spdif 35
+ emi 36
+ saif 37
+ lcdif 38
+ etm 39
+ usb 40
+ usb_phy 41
+
+properties:
+ compatible:
+ const: fsl,imx23-clkctrl
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ clock-controller@80040000 {
+ compatible = "fsl,imx23-clkctrl";
+ reg = <0x80040000 0x2000>;
+ #clock-cells = <1>;
+ };
+
+ serial@8006c000 {
+ compatible = "fsl,imx23-auart";
+ reg = <0x8006c000 0x2000>;
+ interrupts = <24 25 23>;
+ clocks = <&clks 32>;
+ };
diff --git a/Bindings/clock/imx25-clock.txt b/Bindings/clock/imx25-clock.txt
deleted file mode 100644
index f8135ea9ca4e..000000000000
--- a/Bindings/clock/imx25-clock.txt
+++ /dev/null
@@ -1,160 +0,0 @@
-* Clock bindings for Freescale i.MX25
-
-Required properties:
-- compatible: Should be "fsl,imx25-ccm"
-- reg: Address and length of the register set
-- interrupts: Should contain CCM interrupt
-- #clock-cells: Should be <1>
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. The following is a full list of i.MX25
-clocks and IDs.
-
- Clock ID
- ---------------------------
- dummy 0
- osc 1
- mpll 2
- upll 3
- mpll_cpu_3_4 4
- cpu_sel 5
- cpu 6
- ahb 7
- usb_div 8
- ipg 9
- per0_sel 10
- per1_sel 11
- per2_sel 12
- per3_sel 13
- per4_sel 14
- per5_sel 15
- per6_sel 16
- per7_sel 17
- per8_sel 18
- per9_sel 19
- per10_sel 20
- per11_sel 21
- per12_sel 22
- per13_sel 23
- per14_sel 24
- per15_sel 25
- per0 26
- per1 27
- per2 28
- per3 29
- per4 30
- per5 31
- per6 32
- per7 33
- per8 34
- per9 35
- per10 36
- per11 37
- per12 38
- per13 39
- per14 40
- per15 41
- csi_ipg_per 42
- epit_ipg_per 43
- esai_ipg_per 44
- esdhc1_ipg_per 45
- esdhc2_ipg_per 46
- gpt_ipg_per 47
- i2c_ipg_per 48
- lcdc_ipg_per 49
- nfc_ipg_per 50
- owire_ipg_per 51
- pwm_ipg_per 52
- sim1_ipg_per 53
- sim2_ipg_per 54
- ssi1_ipg_per 55
- ssi2_ipg_per 56
- uart_ipg_per 57
- ata_ahb 58
- reserved 59
- csi_ahb 60
- emi_ahb 61
- esai_ahb 62
- esdhc1_ahb 63
- esdhc2_ahb 64
- fec_ahb 65
- lcdc_ahb 66
- rtic_ahb 67
- sdma_ahb 68
- slcdc_ahb 69
- usbotg_ahb 70
- reserved 71
- reserved 72
- reserved 73
- reserved 74
- can1_ipg 75
- can2_ipg 76
- csi_ipg 77
- cspi1_ipg 78
- cspi2_ipg 79
- cspi3_ipg 80
- dryice_ipg 81
- ect_ipg 82
- epit1_ipg 83
- epit2_ipg 84
- reserved 85
- esdhc1_ipg 86
- esdhc2_ipg 87
- fec_ipg 88
- reserved 89
- reserved 90
- reserved 91
- gpt1_ipg 92
- gpt2_ipg 93
- gpt3_ipg 94
- gpt4_ipg 95
- reserved 96
- reserved 97
- reserved 98
- iim_ipg 99
- reserved 100
- reserved 101
- kpp_ipg 102
- lcdc_ipg 103
- reserved 104
- pwm1_ipg 105
- pwm2_ipg 106
- pwm3_ipg 107
- pwm4_ipg 108
- rngb_ipg 109
- reserved 110
- scc_ipg 111
- sdma_ipg 112
- sim1_ipg 113
- sim2_ipg 114
- slcdc_ipg 115
- spba_ipg 116
- ssi1_ipg 117
- ssi2_ipg 118
- tsc_ipg 119
- uart1_ipg 120
- uart2_ipg 121
- uart3_ipg 122
- uart4_ipg 123
- uart5_ipg 124
- reserved 125
- wdt_ipg 126
- cko_div 127
- cko_sel 128
- cko 129
-
-Examples:
-
-clks: ccm@53f80000 {
- compatible = "fsl,imx25-ccm";
- reg = <0x53f80000 0x4000>;
- interrupts = <31>;
-};
-
-uart1: serial@43f90000 {
- compatible = "fsl,imx25-uart", "fsl,imx21-uart";
- reg = <0x43f90000 0x4000>;
- interrupts = <45>;
- clocks = <&clks 79>, <&clks 50>;
- clock-names = "ipg", "per";
-};
diff --git a/Bindings/clock/imx25-clock.yaml b/Bindings/clock/imx25-clock.yaml
new file mode 100644
index 000000000000..2a2b10778e72
--- /dev/null
+++ b/Bindings/clock/imx25-clock.yaml
@@ -0,0 +1,186 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx25-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX25
+
+maintainers:
+ - Sascha Hauer
+
+description: |
+ The clock consumer should specify the desired clock by having the clock
+ ID in its "clocks" phandle cell. The following is a full list of i.MX25
+ clocks and IDs.
+
+ Clock ID
+ --------------------------
+ dummy 0
+ osc 1
+ mpll 2
+ upll 3
+ mpll_cpu_3_4 4
+ cpu_sel 5
+ cpu 6
+ ahb 7
+ usb_div 8
+ ipg 9
+ per0_sel 10
+ per1_sel 11
+ per2_sel 12
+ per3_sel 13
+ per4_sel 14
+ per5_sel 15
+ per6_sel 16
+ per7_sel 17
+ per8_sel 18
+ per9_sel 19
+ per10_sel 20
+ per11_sel 21
+ per12_sel 22
+ per13_sel 23
+ per14_sel 24
+ per15_sel 25
+ per0 26
+ per1 27
+ per2 28
+ per3 29
+ per4 30
+ per5 31
+ per6 32
+ per7 33
+ per8 34
+ per9 35
+ per10 36
+ per11 37
+ per12 38
+ per13 39
+ per14 40
+ per15 41
+ csi_ipg_per 42
+ epit_ipg_per 43
+ esai_ipg_per 44
+ esdhc1_ipg_per 45
+ esdhc2_ipg_per 46
+ gpt_ipg_per 47
+ i2c_ipg_per 48
+ lcdc_ipg_per 49
+ nfc_ipg_per 50
+ owire_ipg_per 51
+ pwm_ipg_per 52
+ sim1_ipg_per 53
+ sim2_ipg_per 54
+ ssi1_ipg_per 55
+ ssi2_ipg_per 56
+ uart_ipg_per 57
+ ata_ahb 58
+ reserved 59
+ csi_ahb 60
+ emi_ahb 61
+ esai_ahb 62
+ esdhc1_ahb 63
+ esdhc2_ahb 64
+ fec_ahb 65
+ lcdc_ahb 66
+ rtic_ahb 67
+ sdma_ahb 68
+ slcdc_ahb 69
+ usbotg_ahb 70
+ reserved 71
+ reserved 72
+ reserved 73
+ reserved 74
+ can1_ipg 75
+ can2_ipg 76
+ csi_ipg 77
+ cspi1_ipg 78
+ cspi2_ipg 79
+ cspi3_ipg 80
+ dryice_ipg 81
+ ect_ipg 82
+ epit1_ipg 83
+ epit2_ipg 84
+ reserved 85
+ esdhc1_ipg 86
+ esdhc2_ipg 87
+ fec_ipg 88
+ reserved 89
+ reserved 90
+ reserved 91
+ gpt1_ipg 92
+ gpt2_ipg 93
+ gpt3_ipg 94
+ gpt4_ipg 95
+ reserved 96
+ reserved 97
+ reserved 98
+ iim_ipg 99
+ reserved 100
+ reserved 101
+ kpp_ipg 102
+ lcdc_ipg 103
+ reserved 104
+ pwm1_ipg 105
+ pwm2_ipg 106
+ pwm3_ipg 107
+ pwm4_ipg 108
+ rngb_ipg 109
+ reserved 110
+ scc_ipg 111
+ sdma_ipg 112
+ sim1_ipg 113
+ sim2_ipg 114
+ slcdc_ipg 115
+ spba_ipg 116
+ ssi1_ipg 117
+ ssi2_ipg 118
+ tsc_ipg 119
+ uart1_ipg 120
+ uart2_ipg 121
+ uart3_ipg 122
+ uart4_ipg 123
+ uart5_ipg 124
+ reserved 125
+ wdt_ipg 126
+ cko_div 127
+ cko_sel 128
+ cko 129
+
+properties:
+ compatible:
+ const: fsl,imx25-ccm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ clock-controller@53f80000 {
+ compatible = "fsl,imx25-ccm";
+ reg = <0x53f80000 0x4000>;
+ interrupts = <31>;
+ #clock-cells = <1>;
+ };
+
+ serial@43f90000 {
+ compatible = "fsl,imx25-uart", "fsl,imx21-uart";
+ reg = <0x43f90000 0x4000>;
+ interrupts = <45>;
+ clocks = <&clks 79>, <&clks 50>;
+ clock-names = "ipg", "per";
+ };
diff --git a/Bindings/clock/imx27-clock.txt b/Bindings/clock/imx27-clock.txt
deleted file mode 100644
index 4c95c048d3b2..000000000000
--- a/Bindings/clock/imx27-clock.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-* Clock bindings for Freescale i.MX27
-
-Required properties:
-- compatible: Should be "fsl,imx27-ccm"
-- reg: Address and length of the register set
-- interrupts: Should contain CCM interrupt
-- #clock-cells: Should be <1>
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx27-clock.h
-for the full list of i.MX27 clock IDs.
-
-Examples:
- clks: ccm@10027000{
- compatible = "fsl,imx27-ccm";
- reg = <0x10027000 0x1000>;
- #clock-cells = <1>;
- };
-
- uart1: serial@1000a000 {
- compatible = "fsl,imx27-uart", "fsl,imx21-uart";
- reg = <0x1000a000 0x1000>;
- interrupts = <20>;
- clocks = <&clks IMX27_CLK_UART1_IPG_GATE>,
- <&clks IMX27_CLK_PER1_GATE>;
- clock-names = "ipg", "per";
- };
diff --git a/Bindings/clock/imx27-clock.yaml b/Bindings/clock/imx27-clock.yaml
new file mode 100644
index 000000000000..a75365453dbc
--- /dev/null
+++ b/Bindings/clock/imx27-clock.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx27-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX27
+
+maintainers:
+ - Fabio Estevam
+
+description: |
+ The clock consumer should specify the desired clock by having the clock
+ ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx27-clock.h
+ for the full list of i.MX27 clock IDs.
+
+properties:
+ compatible:
+ const: fsl,imx27-ccm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include
+
+ clock-controller@10027000 {
+ compatible = "fsl,imx27-ccm";
+ reg = <0x10027000 0x1000>;
+ interrupts = <31>;
+ #clock-cells = <1>;
+ };
+
+ serial@1000a000 {
+ compatible = "fsl,imx27-uart", "fsl,imx21-uart";
+ reg = <0x1000a000 0x1000>;
+ interrupts = <20>;
+ clocks = <&clks IMX27_CLK_UART1_IPG_GATE>,
+ <&clks IMX27_CLK_PER1_GATE>;
+ clock-names = "ipg", "per";
+ };
diff --git a/Bindings/clock/imx28-clock.txt b/Bindings/clock/imx28-clock.txt
deleted file mode 100644
index d84a37d2885f..000000000000
--- a/Bindings/clock/imx28-clock.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-* Clock bindings for Freescale i.MX28
-
-Required properties:
-- compatible: Should be "fsl,imx28-clkctrl"
-- reg: Address and length of the register set
-- #clock-cells: Should be <1>
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. The following is a full list of i.MX28
-clocks and IDs.
-
- Clock ID
- ------------------
- ref_xtal 0
- pll0 1
- pll1 2
- pll2 3
- ref_cpu 4
- ref_emi 5
- ref_io0 6
- ref_io1 7
- ref_pix 8
- ref_hsadc 9
- ref_gpmi 10
- saif0_sel 11
- saif1_sel 12
- gpmi_sel 13
- ssp0_sel 14
- ssp1_sel 15
- ssp2_sel 16
- ssp3_sel 17
- emi_sel 18
- etm_sel 19
- lcdif_sel 20
- cpu 21
- ptp_sel 22
- cpu_pll 23
- cpu_xtal 24
- hbus 25
- xbus 26
- ssp0_div 27
- ssp1_div 28
- ssp2_div 29
- ssp3_div 30
- gpmi_div 31
- emi_pll 32
- emi_xtal 33
- lcdif_div 34
- etm_div 35
- ptp 36
- saif0_div 37
- saif1_div 38
- clk32k_div 39
- rtc 40
- lradc 41
- spdif_div 42
- clk32k 43
- pwm 44
- uart 45
- ssp0 46
- ssp1 47
- ssp2 48
- ssp3 49
- gpmi 50
- spdif 51
- emi 52
- saif0 53
- saif1 54
- lcdif 55
- etm 56
- fec 57
- can0 58
- can1 59
- usb0 60
- usb1 61
- usb0_phy 62
- usb1_phy 63
- enet_out 64
-
-Examples:
-
-clks: clkctrl@80040000 {
- compatible = "fsl,imx28-clkctrl";
- reg = <0x80040000 0x2000>;
- #clock-cells = <1>;
-};
-
-auart0: serial@8006a000 {
- compatible = "fsl,imx28-auart", "fsl,imx23-auart";
- reg = <0x8006a000 0x2000>;
- interrupts = <112 70 71>;
- clocks = <&clks 45>;
-};
diff --git a/Bindings/clock/imx28-clock.yaml b/Bindings/clock/imx28-clock.yaml
new file mode 100644
index 000000000000..72328d5ca09a
--- /dev/null
+++ b/Bindings/clock/imx28-clock.yaml
@@ -0,0 +1,115 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx28-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX28
+
+maintainers:
+ - Shawn Guo
+
+description: |
+ The clock consumer should specify the desired clock by having the clock
+ ID in its "clocks" phandle cell. The following is a full list of i.MX28
+ clocks and IDs.
+
+ Clock ID
+ ------------------
+ ref_xtal 0
+ pll0 1
+ pll1 2
+ pll2 3
+ ref_cpu 4
+ ref_emi 5
+ ref_io0 6
+ ref_io1 7
+ ref_pix 8
+ ref_hsadc 9
+ ref_gpmi 10
+ saif0_sel 11
+ saif1_sel 12
+ gpmi_sel 13
+ ssp0_sel 14
+ ssp1_sel 15
+ ssp2_sel 16
+ ssp3_sel 17
+ emi_sel 18
+ etm_sel 19
+ lcdif_sel 20
+ cpu 21
+ ptp_sel 22
+ cpu_pll 23
+ cpu_xtal 24
+ hbus 25
+ xbus 26
+ ssp0_div 27
+ ssp1_div 28
+ ssp2_div 29
+ ssp3_div 30
+ gpmi_div 31
+ emi_pll 32
+ emi_xtal 33
+ lcdif_div 34
+ etm_div 35
+ ptp 36
+ saif0_div 37
+ saif1_div 38
+ clk32k_div 39
+ rtc 40
+ lradc 41
+ spdif_div 42
+ clk32k 43
+ pwm 44
+ uart 45
+ ssp0 46
+ ssp1 47
+ ssp2 48
+ ssp3 49
+ gpmi 50
+ spdif 51
+ emi 52
+ saif0 53
+ saif1 54
+ lcdif 55
+ etm 56
+ fec 57
+ can0 58
+ can1 59
+ usb0 60
+ usb1 61
+ usb0_phy 62
+ usb1_phy 63
+ enet_out 64
+
+properties:
+ compatible:
+ const: fsl,imx28-clkctrl
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ clock-controller@80040000 {
+ compatible = "fsl,imx28-clkctrl";
+ reg = <0x80040000 0x2000>;
+ #clock-cells = <1>;
+ };
+
+ serial@8006a000 {
+ compatible = "fsl,imx28-auart", "fsl,imx23-auart";
+ reg = <0x8006a000 0x2000>;
+ interrupts = <112 70 71>;
+ clocks = <&clks 45>;
+ };
diff --git a/Bindings/clock/imx31-clock.txt b/Bindings/clock/imx31-clock.txt
deleted file mode 100644
index 0a291090e562..000000000000
--- a/Bindings/clock/imx31-clock.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-* Clock bindings for Freescale i.MX31
-
-Required properties:
-- compatible: Should be "fsl,imx31-ccm"
-- reg: Address and length of the register set
-- interrupts: Should contain CCM interrupt
-- #clock-cells: Should be <1>
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. The following is a full list of i.MX31
-clocks and IDs.
-
- Clock ID
- -----------------------
- dummy 0
- ckih 1
- ckil 2
- mpll 3
- spll 4
- upll 5
- mcu_main 6
- hsp 7
- ahb 8
- nfc 9
- ipg 10
- per_div 11
- per 12
- csi_sel 13
- fir_sel 14
- csi_div 15
- usb_div_pre 16
- usb_div_post 17
- fir_div_pre 18
- fir_div_post 19
- sdhc1_gate 20
- sdhc2_gate 21
- gpt_gate 22
- epit1_gate 23
- epit2_gate 24
- iim_gate 25
- ata_gate 26
- sdma_gate 27
- cspi3_gate 28
- rng_gate 29
- uart1_gate 30
- uart2_gate 31
- ssi1_gate 32
- i2c1_gate 33
- i2c2_gate 34
- i2c3_gate 35
- hantro_gate 36
- mstick1_gate 37
- mstick2_gate 38
- csi_gate 39
- rtc_gate 40
- wdog_gate 41
- pwm_gate 42
- sim_gate 43
- ect_gate 44
- usb_gate 45
- kpp_gate 46
- ipu_gate 47
- uart3_gate 48
- uart4_gate 49
- uart5_gate 50
- owire_gate 51
- ssi2_gate 52
- cspi1_gate 53
- cspi2_gate 54
- gacc_gate 55
- emi_gate 56
- rtic_gate 57
- firi_gate 58
-
-Examples:
-
-clks: ccm@53f80000{
- compatible = "fsl,imx31-ccm";
- reg = <0x53f80000 0x4000>;
- interrupts = <31>, <53>;
- #clock-cells = <1>;
-};
-
-uart1: serial@43f90000 {
- compatible = "fsl,imx31-uart", "fsl,imx21-uart";
- reg = <0x43f90000 0x4000>;
- interrupts = <45>;
- clocks = <&clks 10>, <&clks 30>;
- clock-names = "ipg", "per";
-};
diff --git a/Bindings/clock/imx31-clock.yaml b/Bindings/clock/imx31-clock.yaml
new file mode 100644
index 000000000000..a25a374b3b2a
--- /dev/null
+++ b/Bindings/clock/imx31-clock.yaml
@@ -0,0 +1,120 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx31-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX31
+
+maintainers:
+ - Fabio Estevam
+
+description: |
+ The clock consumer should specify the desired clock by having the clock
+ ID in its "clocks" phandle cell. The following is a full list of i.MX31
+ clocks and IDs.
+
+ Clock ID
+ -----------------------
+ dummy 0
+ ckih 1
+ ckil 2
+ mpll 3
+ spll 4
+ upll 5
+ mcu_main 6
+ hsp 7
+ ahb 8
+ nfc 9
+ ipg 10
+ per_div 11
+ per 12
+ csi_sel 13
+ fir_sel 14
+ csi_div 15
+ usb_div_pre 16
+ usb_div_post 17
+ fir_div_pre 18
+ fir_div_post 19
+ sdhc1_gate 20
+ sdhc2_gate 21
+ gpt_gate 22
+ epit1_gate 23
+ epit2_gate 24
+ iim_gate 25
+ ata_gate 26
+ sdma_gate 27
+ cspi3_gate 28
+ rng_gate 29
+ uart1_gate 30
+ uart2_gate 31
+ ssi1_gate 32
+ i2c1_gate 33
+ i2c2_gate 34
+ i2c3_gate 35
+ hantro_gate 36
+ mstick1_gate 37
+ mstick2_gate 38
+ csi_gate 39
+ rtc_gate 40
+ wdog_gate 41
+ pwm_gate 42
+ sim_gate 43
+ ect_gate 44
+ usb_gate 45
+ kpp_gate 46
+ ipu_gate 47
+ uart3_gate 48
+ uart4_gate 49
+ uart5_gate 50
+ owire_gate 51
+ ssi2_gate 52
+ cspi1_gate 53
+ cspi2_gate 54
+ gacc_gate 55
+ emi_gate 56
+ rtic_gate 57
+ firi_gate 58
+
+properties:
+ compatible:
+ const: fsl,imx31-ccm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ description: CCM provides 2 interrupt requests, request 1 is to generate
+ interrupt for DVFS when a frequency change is requested, request 2 is
+ to generate interrupt for DPTC when a voltage change is requested.
+ items:
+ - description: CCM DVFS interrupt request 1
+ - description: CCM DPTC interrupt request 2
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ clock-controller@53f80000 {
+ compatible = "fsl,imx31-ccm";
+ reg = <0x53f80000 0x4000>;
+ interrupts = <31>, <53>;
+ #clock-cells = <1>;
+ };
+
+ serial@43f90000 {
+ compatible = "fsl,imx31-uart", "fsl,imx21-uart";
+ reg = <0x43f90000 0x4000>;
+ interrupts = <45>;
+ clocks = <&clks 10>, <&clks 30>;
+ clock-names = "ipg", "per";
+ };
diff --git a/Bindings/clock/imx35-clock.txt b/Bindings/clock/imx35-clock.txt
deleted file mode 100644
index f49783213c56..000000000000
--- a/Bindings/clock/imx35-clock.txt
+++ /dev/null
@@ -1,114 +0,0 @@
-* Clock bindings for Freescale i.MX35
-
-Required properties:
-- compatible: Should be "fsl,imx35-ccm"
-- reg: Address and length of the register set
-- interrupts: Should contain CCM interrupt
-- #clock-cells: Should be <1>
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. The following is a full list of i.MX35
-clocks and IDs.
-
- Clock ID
- ---------------------------
- ckih 0
- mpll 1
- ppll 2
- mpll_075 3
- arm 4
- hsp 5
- hsp_div 6
- hsp_sel 7
- ahb 8
- ipg 9
- arm_per_div 10
- ahb_per_div 11
- ipg_per 12
- uart_sel 13
- uart_div 14
- esdhc_sel 15
- esdhc1_div 16
- esdhc2_div 17
- esdhc3_div 18
- spdif_sel 19
- spdif_div_pre 20
- spdif_div_post 21
- ssi_sel 22
- ssi1_div_pre 23
- ssi1_div_post 24
- ssi2_div_pre 25
- ssi2_div_post 26
- usb_sel 27
- usb_div 28
- nfc_div 29
- asrc_gate 30
- pata_gate 31
- audmux_gate 32
- can1_gate 33
- can2_gate 34
- cspi1_gate 35
- cspi2_gate 36
- ect_gate 37
- edio_gate 38
- emi_gate 39
- epit1_gate 40
- epit2_gate 41
- esai_gate 42
- esdhc1_gate 43
- esdhc2_gate 44
- esdhc3_gate 45
- fec_gate 46
- gpio1_gate 47
- gpio2_gate 48
- gpio3_gate 49
- gpt_gate 50
- i2c1_gate 51
- i2c2_gate 52
- i2c3_gate 53
- iomuxc_gate 54
- ipu_gate 55
- kpp_gate 56
- mlb_gate 57
- mshc_gate 58
- owire_gate 59
- pwm_gate 60
- rngc_gate 61
- rtc_gate 62
- rtic_gate 63
- scc_gate 64
- sdma_gate 65
- spba_gate 66
- spdif_gate 67
- ssi1_gate 68
- ssi2_gate 69
- uart1_gate 70
- uart2_gate 71
- uart3_gate 72
- usbotg_gate 73
- wdog_gate 74
- max_gate 75
- admux_gate 76
- csi_gate 77
- csi_div 78
- csi_sel 79
- iim_gate 80
- gpu2d_gate 81
- ckli_gate 82
-
-Examples:
-
-clks: ccm@53f80000 {
- compatible = "fsl,imx35-ccm";
- reg = <0x53f80000 0x4000>;
- interrupts = <31>;
- #clock-cells = <1>;
-};
-
-esdhc1: esdhc@53fb4000 {
- compatible = "fsl,imx35-esdhc";
- reg = <0x53fb4000 0x4000>;
- interrupts = <7>;
- clocks = <&clks 9>, <&clks 8>, <&clks 43>;
- clock-names = "ipg", "ahb", "per";
-};
diff --git a/Bindings/clock/imx35-clock.yaml b/Bindings/clock/imx35-clock.yaml
new file mode 100644
index 000000000000..bd871da6fc7c
--- /dev/null
+++ b/Bindings/clock/imx35-clock.yaml
@@ -0,0 +1,139 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx35-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX35
+
+maintainers:
+ - Steffen Trumtrar
+
+description: |
+ The clock consumer should specify the desired clock by having the clock
+ ID in its "clocks" phandle cell. The following is a full list of i.MX35
+ clocks and IDs.
+
+ Clock ID
+ ---------------------------
+ ckih 0
+ mpll 1
+ ppll 2
+ mpll_075 3
+ arm 4
+ hsp 5
+ hsp_div 6
+ hsp_sel 7
+ ahb 8
+ ipg 9
+ arm_per_div 10
+ ahb_per_div 11
+ ipg_per 12
+ uart_sel 13
+ uart_div 14
+ esdhc_sel 15
+ esdhc1_div 16
+ esdhc2_div 17
+ esdhc3_div 18
+ spdif_sel 19
+ spdif_div_pre 20
+ spdif_div_post 21
+ ssi_sel 22
+ ssi1_div_pre 23
+ ssi1_div_post 24
+ ssi2_div_pre 25
+ ssi2_div_post 26
+ usb_sel 27
+ usb_div 28
+ nfc_div 29
+ asrc_gate 30
+ pata_gate 31
+ audmux_gate 32
+ can1_gate 33
+ can2_gate 34
+ cspi1_gate 35
+ cspi2_gate 36
+ ect_gate 37
+ edio_gate 38
+ emi_gate 39
+ epit1_gate 40
+ epit2_gate 41
+ esai_gate 42
+ esdhc1_gate 43
+ esdhc2_gate 44
+ esdhc3_gate 45
+ fec_gate 46
+ gpio1_gate 47
+ gpio2_gate 48
+ gpio3_gate 49
+ gpt_gate 50
+ i2c1_gate 51
+ i2c2_gate 52
+ i2c3_gate 53
+ iomuxc_gate 54
+ ipu_gate 55
+ kpp_gate 56
+ mlb_gate 57
+ mshc_gate 58
+ owire_gate 59
+ pwm_gate 60
+ rngc_gate 61
+ rtc_gate 62
+ rtic_gate 63
+ scc_gate 64
+ sdma_gate 65
+ spba_gate 66
+ spdif_gate 67
+ ssi1_gate 68
+ ssi2_gate 69
+ uart1_gate 70
+ uart2_gate 71
+ uart3_gate 72
+ usbotg_gate 73
+ wdog_gate 74
+ max_gate 75
+ admux_gate 76
+ csi_gate 77
+ csi_div 78
+ csi_sel 79
+ iim_gate 80
+ gpu2d_gate 81
+ ckli_gate 82
+
+properties:
+ compatible:
+ const: fsl,imx35-ccm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ clock-controller@53f80000 {
+ compatible = "fsl,imx35-ccm";
+ reg = <0x53f80000 0x4000>;
+ interrupts = <31>;
+ #clock-cells = <1>;
+ };
+
+ esdhc@53fb4000 {
+ compatible = "fsl,imx35-esdhc";
+ reg = <0x53fb4000 0x4000>;
+ interrupts = <7>;
+ clocks = <&clks 9>, <&clks 8>, <&clks 43>;
+ clock-names = "ipg", "ahb", "per";
+ };
diff --git a/Bindings/clock/imx5-clock.txt b/Bindings/clock/imx5-clock.txt
deleted file mode 100644
index a24ca9e582d2..000000000000
--- a/Bindings/clock/imx5-clock.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-* Clock bindings for Freescale i.MX5
-
-Required properties:
-- compatible: Should be "fsl,-ccm" , where can be imx51 or imx53
-- reg: Address and length of the register set
-- interrupts: Should contain CCM interrupt
-- #clock-cells: Should be <1>
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx5-clock.h
-for the full list of i.MX5 clock IDs.
-
-Examples (for mx53):
-
-clks: ccm@53fd4000{
- compatible = "fsl,imx53-ccm";
- reg = <0x53fd4000 0x4000>;
- interrupts = <0 71 0x04 0 72 0x04>;
- #clock-cells = <1>;
-};
-
-can1: can@53fc8000 {
- compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan";
- reg = <0x53fc8000 0x4000>;
- interrupts = <82>;
- clocks = <&clks IMX5_CLK_CAN1_IPG_GATE>, <&clks IMX5_CLK_CAN1_SERIAL_GATE>;
- clock-names = "ipg", "per";
-};
diff --git a/Bindings/clock/imx5-clock.yaml b/Bindings/clock/imx5-clock.yaml
new file mode 100644
index 000000000000..4d9e7c73dce9
--- /dev/null
+++ b/Bindings/clock/imx5-clock.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx5-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX5
+
+maintainers:
+ - Fabio Estevam
+
+description: |
+ The clock consumer should specify the desired clock by having the clock
+ ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx5-clock.h
+ for the full list of i.MX5 clock IDs.
+
+properties:
+ compatible:
+ enum:
+ - fsl,imx53-ccm
+ - fsl,imx51-ccm
+ - fsl,imx50-ccm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ description: CCM provides 2 interrupt requests, request 1 is to generate
+ interrupt for frequency or mux change, request 2 is to generate
+ interrupt for oscillator read or PLL lock.
+ items:
+ - description: CCM interrupt request 1
+ - description: CCM interrupt request 2
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include
+ #include
+
+ clock-controller@53fd4000{
+ compatible = "fsl,imx53-ccm";
+ reg = <0x53fd4000 0x4000>;
+ interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>,
+ <0 72 IRQ_TYPE_LEVEL_HIGH>;
+ #clock-cells = <1>;
+ };
+
+ can@53fc8000 {
+ compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan";
+ reg = <0x53fc8000 0x4000>;
+ interrupts = <82>;
+ clocks = <&clks IMX5_CLK_CAN1_IPG_GATE>, <&clks IMX5_CLK_CAN1_SERIAL_GATE>;
+ clock-names = "ipg", "per";
+ };
diff --git a/Bindings/clock/imx6q-clock.txt b/Bindings/clock/imx6q-clock.txt
deleted file mode 100644
index 13d36d4c6991..000000000000
--- a/Bindings/clock/imx6q-clock.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-* Clock bindings for Freescale i.MX6 Quad
-
-Required properties:
-- compatible: Should be "fsl,imx6q-ccm"
-- reg: Address and length of the register set
-- interrupts: Should contain CCM interrupt
-- #clock-cells: Should be <1>
-
-Optional properties:
-- fsl,pmic-stby-poweroff: Configure CCM to assert PMIC_STBY_REQ signal
- on power off.
- Use this property if the SoC should be powered off by external power
- management IC (PMIC) triggered via PMIC_STBY_REQ signal.
- Boards that are designed to initiate poweroff on PMIC_ON_REQ signal should
- be using "syscon-poweroff" driver instead.
-- clocks: list of clock specifiers, must contain an entry for each entry
- in clock-names
-- clock-names: valid names are "osc", "ckil", "ckih1", "anaclk1" and "anaclk2"
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx6qdl-clock.h
-for the full list of i.MX6 Quad and DualLite clock IDs.
-
-Examples:
-
-#include
-
-clks: ccm@20c4000 {
- compatible = "fsl,imx6q-ccm";
- reg = <0x020c4000 0x4000>;
- interrupts = <0 87 0x04 0 88 0x04>;
- #clock-cells = <1>;
-};
-
-uart1: serial@2020000 {
- compatible = "fsl,imx6q-uart", "fsl,imx21-uart";
- reg = <0x02020000 0x4000>;
- interrupts = <0 26 0x04>;
- clocks = <&clks IMX6QDL_CLK_UART_IPG>, <&clks IMX6QDL_CLK_UART_SERIAL>;
- clock-names = "ipg", "per";
-};
diff --git a/Bindings/clock/imx6q-clock.yaml b/Bindings/clock/imx6q-clock.yaml
new file mode 100644
index 000000000000..92a8e545e212
--- /dev/null
+++ b/Bindings/clock/imx6q-clock.yaml
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx6q-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX6 Quad
+
+maintainers:
+ - Anson Huang
+
+properties:
+ compatible:
+ const: fsl,imx6q-ccm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ description: CCM provides 2 interrupt requests, request 1 is to generate
+ interrupt for frequency or mux change, request 2 is to generate
+ interrupt for oscillator read or PLL lock.
+ items:
+ - description: CCM interrupt request 1
+ - description: CCM interrupt request 2
+
+ '#clock-cells':
+ const: 1
+
+ clocks:
+ items:
+ - description: 24m osc
+ - description: 32k osc
+ - description: ckih1 clock input
+ - description: anaclk1 clock input
+ - description: anaclk2 clock input
+
+ clock-names:
+ items:
+ - const: osc
+ - const: ckil
+ - const: ckih1
+ - const: anaclk1
+ - const: anaclk2
+
+ fsl,pmic-stby-poweroff:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: |
+ Use this property if the SoC should be powered off by external power
+ management IC (PMIC) triggered via PMIC_STBY_REQ signal.
+ Boards that are designed to initiate poweroff on PMIC_ON_REQ signal should
+ be using "syscon-poweroff" driver instead.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - '#clock-cells'
+
+examples:
+ # Clock Control Module node:
+ - |
+ #include
+
+ clock-controller@20c4000 {
+ compatible = "fsl,imx6q-ccm";
+ reg = <0x020c4000 0x4000>;
+ interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>,
+ <0 88 IRQ_TYPE_LEVEL_HIGH>;
+ #clock-cells = <1>;
+ };
diff --git a/Bindings/clock/imx6sl-clock.txt b/Bindings/clock/imx6sl-clock.txt
deleted file mode 100644
index 15e40bdf147d..000000000000
--- a/Bindings/clock/imx6sl-clock.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-* Clock bindings for Freescale i.MX6 SoloLite
-
-Required properties:
-- compatible: Should be "fsl,imx6sl-ccm"
-- reg: Address and length of the register set
-- #clock-cells: Should be <1>
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx6sl-clock.h
-for the full list of i.MX6 SoloLite clock IDs.
diff --git a/Bindings/clock/imx6sl-clock.yaml b/Bindings/clock/imx6sl-clock.yaml
new file mode 100644
index 000000000000..c97bf95b4150
--- /dev/null
+++ b/Bindings/clock/imx6sl-clock.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx6sl-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX6 SoloLite
+
+maintainers:
+ - Anson Huang
+
+properties:
+ compatible:
+ const: fsl,imx6sl-ccm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ description: CCM provides 2 interrupt requests, request 1 is to generate
+ interrupt for frequency or mux change, request 2 is to generate
+ interrupt for oscillator read or PLL lock.
+ items:
+ - description: CCM interrupt request 1
+ - description: CCM interrupt request 2
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - '#clock-cells'
+
+examples:
+ # Clock Control Module node:
+ - |
+ #include
+
+ clock-controller@20c4000 {
+ compatible = "fsl,imx6sl-ccm";
+ reg = <0x020c4000 0x4000>;
+ interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>,
+ <0 88 IRQ_TYPE_LEVEL_HIGH>;
+ #clock-cells = <1>;
+ };
diff --git a/Bindings/clock/imx6sll-clock.txt b/Bindings/clock/imx6sll-clock.txt
deleted file mode 100644
index fee849d5fdd1..000000000000
--- a/Bindings/clock/imx6sll-clock.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-* Clock bindings for Freescale i.MX6 SLL
-
-Required properties:
-- compatible: Should be "fsl,imx6sll-ccm"
-- reg: Address and length of the register set
-- #clock-cells: Should be <1>
-- clocks: list of clock specifiers, must contain an entry for each required
- entry in clock-names
-- clock-names: should include entries "ckil", "osc", "ipp_di0" and "ipp_di1"
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx6sll-clock.h
-for the full list of i.MX6 SLL clock IDs.
-
-Examples:
-
-#include
-
-clks: clock-controller@20c4000 {
- compatible = "fsl,imx6sll-ccm";
- reg = <0x020c4000 0x4000>;
- interrupts = ,
- ;
- #clock-cells = <1>;
- clocks = <&ckil>, <&osc>, <&ipp_di0>, <&ipp_di1>;
- clock-names = "ckil", "osc", "ipp_di0", "ipp_di1";
-};
-
-uart1: serial@2020000 {
- compatible = "fsl,imx6sl-uart", "fsl,imx6q-uart", "fsl,imx21-uart";
- reg = <0x02020000 0x4000>;
- interrupts = ;
- clocks = <&clks IMX6SLL_CLK_UART1_IPG>,
- <&clks IMX6SLL_CLK_UART1_SERIAL>;
- clock-names = "ipg", "per";
-};
diff --git a/Bindings/clock/imx6sll-clock.yaml b/Bindings/clock/imx6sll-clock.yaml
new file mode 100644
index 000000000000..de48924be191
--- /dev/null
+++ b/Bindings/clock/imx6sll-clock.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx6sll-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX6 SLL
+
+maintainers:
+ - Anson Huang
+
+properties:
+ compatible:
+ const: fsl,imx6sll-ccm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ description: CCM provides 2 interrupt requests, request 1 is to generate
+ interrupt for frequency or mux change, request 2 is to generate
+ interrupt for oscillator read or PLL lock.
+ items:
+ - description: CCM interrupt request 1
+ - description: CCM interrupt request 2
+
+ '#clock-cells':
+ const: 1
+
+ clocks:
+ items:
+ - description: 32k osc
+ - description: 24m osc
+ - description: ipp_di0 clock input
+ - description: ipp_di1 clock input
+
+ clock-names:
+ items:
+ - const: ckil
+ - const: osc
+ - const: ipp_di0
+ - const: ipp_di1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - '#clock-cells'
+ - clocks
+ - clock-names
+
+examples:
+ # Clock Control Module node:
+ - |
+ #include
+
+ clock-controller@20c4000 {
+ compatible = "fsl,imx6sll-ccm";
+ reg = <0x020c4000 0x4000>;
+ interrupts = ,
+ ;
+ #clock-cells = <1>;
+ clocks = <&ckil>, <&osc>, <&ipp_di0>, <&ipp_di1>;
+ clock-names = "ckil", "osc", "ipp_di0", "ipp_di1";
+ };
diff --git a/Bindings/clock/imx6sx-clock.txt b/Bindings/clock/imx6sx-clock.txt
deleted file mode 100644
index 22362b9b7ba3..000000000000
--- a/Bindings/clock/imx6sx-clock.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-* Clock bindings for Freescale i.MX6 SoloX
-
-Required properties:
-- compatible: Should be "fsl,imx6sx-ccm"
-- reg: Address and length of the register set
-- #clock-cells: Should be <1>
-- clocks: list of clock specifiers, must contain an entry for each required
- entry in clock-names
-- clock-names: should include entries "ckil", "osc", "ipp_di0" and "ipp_di1"
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx6sx-clock.h
-for the full list of i.MX6 SoloX clock IDs.
diff --git a/Bindings/clock/imx6sx-clock.yaml b/Bindings/clock/imx6sx-clock.yaml
new file mode 100644
index 000000000000..e50cddee43c3
--- /dev/null
+++ b/Bindings/clock/imx6sx-clock.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx6sx-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX6 SoloX
+
+maintainers:
+ - Anson Huang
+
+properties:
+ compatible:
+ const: fsl,imx6sx-ccm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ description: CCM provides 2 interrupt requests, request 1 is to generate
+ interrupt for frequency or mux change, request 2 is to generate
+ interrupt for oscillator read or PLL lock.
+ items:
+ - description: CCM interrupt request 1
+ - description: CCM interrupt request 2
+
+ '#clock-cells':
+ const: 1
+
+ clocks:
+ items:
+ - description: 32k osc
+ - description: 24m osc
+ - description: ipp_di0 clock input
+ - description: ipp_di1 clock input
+ - description: anaclk1 clock input
+ - description: anaclk2 clock input
+
+ clock-names:
+ items:
+ - const: ckil
+ - const: osc
+ - const: ipp_di0
+ - const: ipp_di1
+ - const: anaclk1
+ - const: anaclk2
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - '#clock-cells'
+ - clocks
+ - clock-names
+
+examples:
+ # Clock Control Module node:
+ - |
+ #include
+
+ clock-controller@20c4000 {
+ compatible = "fsl,imx6sx-ccm";
+ reg = <0x020c4000 0x4000>;
+ interrupts = ,
+ ;
+ #clock-cells = <1>;
+ clocks = <&ckil>, <&osc>, <&ipp_di0>, <&ipp_di1>, <&anaclk1>, <&anaclk2>;
+ clock-names = "ckil", "osc", "ipp_di0", "ipp_di1", "anaclk1", "anaclk2";
+ };
diff --git a/Bindings/clock/imx6ul-clock.txt b/Bindings/clock/imx6ul-clock.txt
deleted file mode 100644
index 571d5039f663..000000000000
--- a/Bindings/clock/imx6ul-clock.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-* Clock bindings for Freescale i.MX6 UltraLite
-
-Required properties:
-- compatible: Should be "fsl,imx6ul-ccm"
-- reg: Address and length of the register set
-- #clock-cells: Should be <1>
-- clocks: list of clock specifiers, must contain an entry for each required
- entry in clock-names
-- clock-names: should include entries "ckil", "osc", "ipp_di0" and "ipp_di1"
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx6ul-clock.h
-for the full list of i.MX6 UltraLite clock IDs.
diff --git a/Bindings/clock/imx6ul-clock.yaml b/Bindings/clock/imx6ul-clock.yaml
new file mode 100644
index 000000000000..36ce7667c972
--- /dev/null
+++ b/Bindings/clock/imx6ul-clock.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx6ul-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX6 UltraLite
+
+maintainers:
+ - Anson Huang
+
+properties:
+ compatible:
+ const: fsl,imx6ul-ccm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ description: CCM provides 2 interrupt requests, request 1 is to generate
+ interrupt for frequency or mux change, request 2 is to generate
+ interrupt for oscillator read or PLL lock.
+ items:
+ - description: CCM interrupt request 1
+ - description: CCM interrupt request 2
+
+ '#clock-cells':
+ const: 1
+
+ clocks:
+ items:
+ - description: 32k osc
+ - description: 24m osc
+ - description: ipp_di0 clock input
+ - description: ipp_di1 clock input
+
+ clock-names:
+ items:
+ - const: ckil
+ - const: osc
+ - const: ipp_di0
+ - const: ipp_di1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - '#clock-cells'
+ - clocks
+ - clock-names
+
+examples:
+ # Clock Control Module node:
+ - |
+ #include
+
+ clock-controller@20c4000 {
+ compatible = "fsl,imx6ul-ccm";
+ reg = <0x020c4000 0x4000>;
+ interrupts = ,
+ ;
+ #clock-cells = <1>;
+ clocks = <&ckil>, <&osc>, <&ipp_di0>, <&ipp_di1>;
+ clock-names = "ckil", "osc", "ipp_di0", "ipp_di1";
+ };
diff --git a/Bindings/clock/imx7d-clock.txt b/Bindings/clock/imx7d-clock.txt
deleted file mode 100644
index 9d3026d81a68..000000000000
--- a/Bindings/clock/imx7d-clock.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-* Clock bindings for Freescale i.MX7 Dual
-
-Required properties:
-- compatible: Should be "fsl,imx7d-ccm"
-- reg: Address and length of the register set
-- #clock-cells: Should be <1>
-- clocks: list of clock specifiers, must contain an entry for each required
- entry in clock-names
-- clock-names: should include entries "ckil", "osc"
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx7d-clock.h
-for the full list of i.MX7 Dual clock IDs.
diff --git a/Bindings/clock/imx7d-clock.yaml b/Bindings/clock/imx7d-clock.yaml
new file mode 100644
index 000000000000..cefb61db01a8
--- /dev/null
+++ b/Bindings/clock/imx7d-clock.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx7d-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Clock bindings for Freescale i.MX7 Dual
+
+maintainers:
+ - Frank Li
+ - Anson Huang
+
+description: |
+ The clock consumer should specify the desired clock by having the clock
+ ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx7d-clock.h
+ for the full list of i.MX7 Dual clock IDs.
+
+properties:
+ compatible:
+ const: fsl,imx7d-ccm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ items:
+ - description: CCM interrupt request 1
+ - description: CCM interrupt request 2
+
+ '#clock-cells':
+ const: 1
+
+ clocks:
+ items:
+ - description: 32k osc
+ - description: 24m osc
+
+ clock-names:
+ items:
+ - const: ckil
+ - const: osc
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include
+
+ clock-controller@30380000 {
+ compatible = "fsl,imx7d-ccm";
+ reg = <0x30380000 0x10000>;
+ interrupts = ,
+ ;
+ #clock-cells = <1>;
+ clocks = <&ckil>, <&osc>;
+ clock-names = "ckil", "osc";
+ };
diff --git a/Bindings/clock/imx8qxp-lpcg.txt b/Bindings/clock/imx8qxp-lpcg.txt
deleted file mode 100644
index 965cfa42e025..000000000000
--- a/Bindings/clock/imx8qxp-lpcg.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-* NXP i.MX8QXP LPCG (Low-Power Clock Gating) Clock bindings
-
-The Low-Power Clock Gate (LPCG) modules contain a local programming
-model to control the clock gates for the peripherals. An LPCG module
-is used to locally gate the clocks for the associated peripheral.
-
-Note:
-This level of clock gating is provided after the clocks are generated
-by the SCU resources and clock controls. Thus even if the clock is
-enabled by these control bits, it might still not be running based
-on the base resource.
-
-Required properties:
-- compatible: Should be one of:
- "fsl,imx8qxp-lpcg-adma",
- "fsl,imx8qxp-lpcg-conn",
- "fsl,imx8qxp-lpcg-dc",
- "fsl,imx8qxp-lpcg-dsp",
- "fsl,imx8qxp-lpcg-gpu",
- "fsl,imx8qxp-lpcg-hsio",
- "fsl,imx8qxp-lpcg-img",
- "fsl,imx8qxp-lpcg-lsio",
- "fsl,imx8qxp-lpcg-vpu"
-- reg: Address and length of the register set
-- #clock-cells: Should be <1>
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell.
-See the full list of clock IDs from:
-include/dt-bindings/clock/imx8qxp-clock.h
-
-Examples:
-
-#include
-
-conn_lpcg: clock-controller@5b200000 {
- compatible = "fsl,imx8qxp-lpcg-conn";
- reg = <0x5b200000 0xb0000>;
- #clock-cells = <1>;
-};
-
-usdhc1: mmc@5b010000 {
- compatible = "fsl,imx8qxp-usdhc", "fsl,imx7d-usdhc";
- interrupt-parent = <&gic>;
- interrupts = ;
- reg = <0x5b010000 0x10000>;
- clocks = <&conn_lpcg IMX8QXP_CONN_LPCG_SDHC0_IPG_CLK>,
- <&conn_lpcg IMX8QXP_CONN_LPCG_SDHC0_PER_CLK>,
- <&conn_lpcg IMX8QXP_CONN_LPCG_SDHC0_HCLK>;
- clock-names = "ipg", "per", "ahb";
-};
diff --git a/Bindings/clock/imx8qxp-lpcg.yaml b/Bindings/clock/imx8qxp-lpcg.yaml
new file mode 100644
index 000000000000..33f3010f48c3
--- /dev/null
+++ b/Bindings/clock/imx8qxp-lpcg.yaml
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/imx8qxp-lpcg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP i.MX8QXP LPCG (Low-Power Clock Gating) Clock bindings
+
+maintainers:
+ - Aisheng Dong
+
+description: |
+ The Low-Power Clock Gate (LPCG) modules contain a local programming
+ model to control the clock gates for the peripherals. An LPCG module
+ is used to locally gate the clocks for the associated peripheral.
+
+ This level of clock gating is provided after the clocks are generated
+ by the SCU resources and clock controls. Thus even if the clock is
+ enabled by these control bits, it might still not be running based
+ on the base resource.
+
+ The clock consumer should specify the desired clock by having the clock
+ ID in its "clocks" phandle cell. See the full list of clock IDs from:
+ include/dt-bindings/clock/imx8-clock.h
+
+properties:
+ compatible:
+ enum:
+ - fsl,imx8qxp-lpcg-adma
+ - fsl,imx8qxp-lpcg-conn
+ - fsl,imx8qxp-lpcg-dc
+ - fsl,imx8qxp-lpcg-dsp
+ - fsl,imx8qxp-lpcg-gpu
+ - fsl,imx8qxp-lpcg-hsio
+ - fsl,imx8qxp-lpcg-img
+ - fsl,imx8qxp-lpcg-lsio
+ - fsl,imx8qxp-lpcg-vpu
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include
+ #include
+ #include
+
+ clock-controller@5b200000 {
+ compatible = "fsl,imx8qxp-lpcg-conn";
+ reg = <0x5b200000 0xb0000>;
+ #clock-cells = <1>;
+ };
+
+ mmc@5b010000 {
+ compatible = "fsl,imx8qxp-usdhc", "fsl,imx7d-usdhc";
+ interrupts = ;
+ reg = <0x5b010000 0x10000>;
+ clocks = <&conn_lpcg IMX_CONN_LPCG_SDHC0_IPG_CLK>,
+ <&conn_lpcg IMX_CONN_LPCG_SDHC0_PER_CLK>,
+ <&conn_lpcg IMX_CONN_LPCG_SDHC0_HCLK>;
+ clock-names = "ipg", "per", "ahb";
+ power-domains = <&pd IMX_SC_R_SDHC_0>;
+ };
diff --git a/Bindings/clock/ingenic,cgu.txt b/Bindings/clock/ingenic,cgu.txt
deleted file mode 100644
index 75598e655067..000000000000
--- a/Bindings/clock/ingenic,cgu.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-Ingenic SoC CGU binding
-
-The CGU in an Ingenic SoC provides all the clocks generated on-chip. It
-typically includes a variety of PLLs, multiplexers, dividers & gates in order
-to provide many different clock signals derived from only 2 external source
-clocks.
-
-Required properties:
-- compatible : Should be one of:
- * ingenic,jz4740-cgu
- * ingenic,jz4725b-cgu
- * ingenic,jz4770-cgu
- * ingenic,jz4780-cgu
- * ingenic,x1000-cgu
-- reg : The address & length of the CGU registers.
-- clocks : List of phandle & clock specifiers for clocks external to the CGU.
- Two such external clocks should be specified - first the external crystal
- "ext" and second the RTC clock source "rtc".
-- clock-names : List of name strings for the external clocks.
-- #clock-cells: Should be 1.
- Clock consumers specify this argument to identify a clock. The valid values
- may be found in -cgu.h>.
-
-Example SoC include file:
-
-/ {
- cgu: jz4740-cgu {
- compatible = "ingenic,jz4740-cgu";
- reg = <0x10000000 0x100>;
- #clock-cells = <1>;
- };
-
- uart0: serial@10030000 {
- clocks = <&cgu JZ4740_CLK_UART0>;
- };
-};
-
-Example board file:
-
-/ {
- ext: clock@0 {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <12000000>;
- };
-
- rtc: clock@1 {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <32768>;
- };
-
- &cgu {
- clocks = <&ext> <&rtc>;
- clock-names: "ext", "rtc";
- };
-};
diff --git a/Bindings/clock/ingenic,cgu.yaml b/Bindings/clock/ingenic,cgu.yaml
new file mode 100644
index 000000000000..a952d5811823
--- /dev/null
+++ b/Bindings/clock/ingenic,cgu.yaml
@@ -0,0 +1,124 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/ingenic,cgu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Ingenic SoCs CGU devicetree bindings
+
+description: |
+ The CGU in an Ingenic SoC provides all the clocks generated on-chip. It
+ typically includes a variety of PLLs, multiplexers, dividers & gates in order
+ to provide many different clock signals derived from only 2 external source
+ clocks.
+
+maintainers:
+ - Paul Cercueil
+
+select:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - ingenic,jz4740-cgu
+ - ingenic,jz4725b-cgu
+ - ingenic,jz4770-cgu
+ - ingenic,jz4780-cgu
+ - ingenic,x1000-cgu
+ - ingenic,x1830-cgu
+ required:
+ - compatible
+
+properties:
+ $nodename:
+ pattern: "^clock-controller@[0-9a-f]+$"
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+ "#clock-cells":
+ const: 1
+
+ ranges: true
+
+ compatible:
+ items:
+ - enum:
+ - ingenic,jz4740-cgu
+ - ingenic,jz4725b-cgu
+ - ingenic,jz4770-cgu
+ - ingenic,jz4780-cgu
+ - ingenic,x1000-cgu
+ - ingenic,x1830-cgu
+ - const: simple-mfd
+ minItems: 1
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: External oscillator clock
+ - description: Internal 32 kHz RTC clock
+
+ clock-names:
+ items:
+ - const: ext
+ - enum:
+ - rtc
+ - osc32k # Different name, same clock
+
+ assigned-clocks:
+ minItems: 1
+ maxItems: 64
+
+ assigned-clock-parents:
+ minItems: 1
+ maxItems: 64
+
+ assigned-clock-rates:
+ minItems: 1
+ maxItems: 64
+
+required:
+ - "#clock-cells"
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+
+patternProperties:
+ "^usb-phy@[a-f0-9]+$":
+ allOf: [ $ref: "../usb/ingenic,jz4770-phy.yaml#" ]
+
+additionalProperties: false
+
+examples:
+ - |
+ #include
+ cgu: clock-controller@10000000 {
+ compatible = "ingenic,jz4770-cgu", "simple-mfd";
+ reg = <0x10000000 0x100>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x10000000 0x100>;
+
+ clocks = <&ext>, <&osc32k>;
+ clock-names = "ext", "osc32k";
+
+ #clock-cells = <1>;
+
+ otg_phy: usb-phy@3c {
+ compatible = "ingenic,jz4770-phy";
+ reg = <0x3c 0x10>;
+
+ clocks = <&cgu JZ4770_CLK_OTG_PHY>;
+
+ vcc-supply = <&ldo5>;
+
+ #phy-cells = <0>;
+ };
+ };
diff --git a/Bindings/clock/intel,agilex.yaml b/Bindings/clock/intel,agilex.yaml
new file mode 100644
index 000000000000..cf5a9eb803e6
--- /dev/null
+++ b/Bindings/clock/intel,agilex.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/intel,agilex.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intel SoCFPGA Agilex platform clock controller binding
+
+maintainers:
+ - Dinh Nguyen
+
+description:
+ The Intel Agilex Clock controller is an integrated clock controller, which
+ generates and supplies to all modules.
+
+properties:
+ compatible:
+ const: intel,agilex-clkmgr
+
+ '#clock-cells':
+ const: 1
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ # Clock controller node:
+ - |
+ clkmgr: clock-controller@ffd10000 {
+ compatible = "intel,agilex-clkmgr";
+ reg = <0xffd10000 0x1000>;
+ clocks = <&osc1>;
+ #clock-cells = <1>;
+ };
+...
diff --git a/Bindings/clock/intel,cgu-lgm.yaml b/Bindings/clock/intel,cgu-lgm.yaml
new file mode 100644
index 000000000000..6dc1414bfb7f
--- /dev/null
+++ b/Bindings/clock/intel,cgu-lgm.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/intel,cgu-lgm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intel Lightning Mountain SoC's Clock Controller(CGU) Binding
+
+maintainers:
+ - Rahul Tanwar
+
+description: |
+ Lightning Mountain(LGM) SoC's Clock Generation Unit(CGU) driver provides
+ all means to access the CGU hardware module in order to generate a series
+ of clocks for the whole system and individual peripherals.
+
+ Please refer to include/dt-bindings/clock/intel,lgm-clk.h header file, it
+ defines all available clocks as macros. These macros can be used in device
+ tree sources.
+
+properties:
+ compatible:
+ const: intel,cgu-lgm
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+
+examples:
+ - |
+ cgu: clock-controller@e0200000 {
+ compatible = "intel,cgu-lgm";
+ reg = <0xe0200000 0x33c>;
+ #clock-cells = <1>;
+ };
+
+...
diff --git a/Bindings/clock/marvell,mmp2-audio-clock.yaml b/Bindings/clock/marvell,mmp2-audio-clock.yaml
new file mode 100644
index 000000000000..dffa73402da9
--- /dev/null
+++ b/Bindings/clock/marvell,mmp2-audio-clock.yaml
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/marvell,mmp2-audio-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell MMP2 Audio Clock Controller
+
+maintainers:
+ - Lubomir Rintel
+
+description: |
+ The audio clock controller generates and supplies the clocks to the audio
+ codec.
+
+ Each clock is assigned an identifier and client nodes use this identifier
+ to specify the clock which they consume.
+
+ All these identifiers could be found in
+ .
+
+properties:
+ compatible:
+ enum:
+ - marvell,mmp2-audio-clock
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: Audio subsystem clock
+ - description: The crystal oscillator clock
+ - description: First I2S clock
+ - description: Second I2S clock
+
+ clock-names:
+ items:
+ - const: audio
+ - const: vctcxo
+ - const: i2s0
+ - const: i2s1
+
+ '#clock-cells':
+ const: 1
+
+ power-domains:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include
+ #include
+ #include
+
+ clock-controller@d42a0c30 {
+ compatible = "marvell,mmp2-audio-clock";
+ reg = <0xd42a0c30 0x10>;
+ clock-names = "audio", "vctcxo", "i2s0", "i2s1";
+ clocks = <&soc_clocks MMP2_CLK_AUDIO>,
+ <&soc_clocks MMP2_CLK_VCTCXO>,
+ <&soc_clocks MMP2_CLK_I2S0>,
+ <&soc_clocks MMP2_CLK_I2S1>;
+ power-domains = <&soc_clocks MMP2_POWER_DOMAIN_AUDIO>;
+ #clock-cells = <1>;
+ };
diff --git a/Bindings/clock/marvell,mmp2-clock.yaml b/Bindings/clock/marvell,mmp2-clock.yaml
index e2b6ac96bbcb..d68f0d196e7d 100644
--- a/Bindings/clock/marvell,mmp2-clock.yaml
+++ b/Bindings/clock/marvell,mmp2-clock.yaml
@@ -42,12 +42,16 @@ properties:
'#reset-cells':
const: 1
+ '#power-domain-cells':
+ const: 1
+
required:
- compatible
- reg
- reg-names
- '#clock-cells'
- '#reset-cells'
+ - '#power-domain-cells'
additionalProperties: false
@@ -61,4 +65,5 @@ examples:
reg-names = "mpmu", "apmu", "apbc";
#clock-cells = <1>;
#reset-cells = <1>;
+ #power-domain-cells = <1>;
};
diff --git a/Bindings/clock/qcom,a53pll.txt b/Bindings/clock/qcom,a53pll.txt
deleted file mode 100644
index e3fa8118eaee..000000000000
--- a/Bindings/clock/qcom,a53pll.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Qualcomm MSM8916 A53 PLL Binding
---------------------------------
-The A53 PLL on MSM8916 platforms is the main CPU PLL used used for frequencies
-above 1GHz.
-
-Required properties :
-- compatible : Shall contain only one of the following:
-
- "qcom,msm8916-a53pll"
-
-- reg : shall contain base register location and length
-
-- #clock-cells : must be set to <0>
-
-Example:
-
- a53pll: clock@b016000 {
- compatible = "qcom,msm8916-a53pll";
- reg = <0xb016000 0x40>;
- #clock-cells = <0>;
- };
-
diff --git a/Bindings/clock/qcom,a53pll.yaml b/Bindings/clock/qcom,a53pll.yaml
new file mode 100644
index 000000000000..20d2638b4cd2
--- /dev/null
+++ b/Bindings/clock/qcom,a53pll.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,a53pll.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm A53 PLL Binding
+
+maintainers:
+ - Sivaprakash Murugesan
+
+description:
+ The A53 PLL on few Qualcomm platforms is the main CPU PLL used used for
+ frequencies above 1GHz.
+
+properties:
+ compatible:
+ const: qcom,msm8916-a53pll
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ #Example 1 - A53 PLL found on MSM8916 devices
+ - |
+ a53pll: clock@b016000 {
+ compatible = "qcom,msm8916-a53pll";
+ reg = <0xb016000 0x40>;
+ #clock-cells = <0>;
+ };
diff --git a/Bindings/clock/qcom,gcc-sc7180.yaml b/Bindings/clock/qcom,gcc-sc7180.yaml
index a345320e0e49..a404c8fbee67 100644
--- a/Bindings/clock/qcom,gcc-sc7180.yaml
+++ b/Bindings/clock/qcom,gcc-sc7180.yaml
@@ -65,7 +65,7 @@ examples:
#include
clock-controller@100000 {
compatible = "qcom,gcc-sc7180";
- reg = <0 0x00100000 0 0x1f0000>;
+ reg = <0x00100000 0x1f0000>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&rpmhcc RPMH_CXO_CLK_A>,
<&sleep_clk>;
diff --git a/Bindings/clock/qcom,gcc-sm8150.yaml b/Bindings/clock/qcom,gcc-sm8150.yaml
index 36f3b3668ced..12766a866625 100644
--- a/Bindings/clock/qcom,gcc-sm8150.yaml
+++ b/Bindings/clock/qcom,gcc-sm8150.yaml
@@ -63,7 +63,7 @@ examples:
#include
clock-controller@100000 {
compatible = "qcom,gcc-sm8150";
- reg = <0 0x00100000 0 0x1f0000>;
+ reg = <0x00100000 0x1f0000>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&sleep_clk>;
clock-names = "bi_tcxo", "sleep_clk";
diff --git a/Bindings/clock/qcom,gcc-sm8250.yaml b/Bindings/clock/qcom,gcc-sm8250.yaml
index 2c40a8aa9815..a5766ff89082 100644
--- a/Bindings/clock/qcom,gcc-sm8250.yaml
+++ b/Bindings/clock/qcom,gcc-sm8250.yaml
@@ -61,7 +61,7 @@ examples:
#include
clock-controller@100000 {
compatible = "qcom,gcc-sm8250";
- reg = <0 0x00100000 0 0x1f0000>;
+ reg = <0x00100000 0x1f0000>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&sleep_clk>;
clock-names = "bi_tcxo", "sleep_clk";
diff --git a/Bindings/clock/qcom,gcc.yaml b/Bindings/clock/qcom,gcc.yaml
index e533bb0cfd2b..ee0467fb5e31 100644
--- a/Bindings/clock/qcom,gcc.yaml
+++ b/Bindings/clock/qcom,gcc.yaml
@@ -22,6 +22,8 @@ description: |
- dt-bindings/reset/qcom,gcc-ipq6018.h
- dt-bindings/clock/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064)
- dt-bindings/reset/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064)
+ - dt-bindings/clock/qcom,gcc-msm8939.h
+ - dt-bindings/reset/qcom,gcc-msm8939.h
- dt-bindings/clock/qcom,gcc-msm8660.h
- dt-bindings/reset/qcom,gcc-msm8660.h
- dt-bindings/clock/qcom,gcc-msm8974.h
@@ -41,6 +43,7 @@ properties:
- qcom,gcc-ipq8064
- qcom,gcc-msm8660
- qcom,gcc-msm8916
+ - qcom,gcc-msm8939
- qcom,gcc-msm8960
- qcom,gcc-msm8974
- qcom,gcc-msm8974pro
diff --git a/Bindings/clock/qcom,mmcc.yaml b/Bindings/clock/qcom,mmcc.yaml
index f684fe67db84..1b16a863b355 100644
--- a/Bindings/clock/qcom,mmcc.yaml
+++ b/Bindings/clock/qcom,mmcc.yaml
@@ -15,15 +15,15 @@ description: |
power domains.
properties:
- compatible :
+ compatible:
enum:
- - qcom,mmcc-apq8064
- - qcom,mmcc-apq8084
- - qcom,mmcc-msm8660
- - qcom,mmcc-msm8960
- - qcom,mmcc-msm8974
- - qcom,mmcc-msm8996
- - qcom,mmcc-msm8998
+ - qcom,mmcc-apq8064
+ - qcom,mmcc-apq8084
+ - qcom,mmcc-msm8660
+ - qcom,mmcc-msm8960
+ - qcom,mmcc-msm8974
+ - qcom,mmcc-msm8996
+ - qcom,mmcc-msm8998
clocks:
items:
@@ -67,6 +67,10 @@ properties:
description:
Protected clock specifier list as per common clock binding
+ vdd-gfx-supply:
+ description:
+ Regulator supply for the GPU_GX GDSC
+
required:
- compatible
- reg
diff --git a/Bindings/clock/qcom,sc7180-dispcc.yaml b/Bindings/clock/qcom,sc7180-dispcc.yaml
index 58cdfd5924d3..e94847f92770 100644
--- a/Bindings/clock/qcom,sc7180-dispcc.yaml
+++ b/Bindings/clock/qcom,sc7180-dispcc.yaml
@@ -66,7 +66,7 @@ examples:
#include
clock-controller@af00000 {
compatible = "qcom,sc7180-dispcc";
- reg = <0 0x0af00000 0 0x200000>;
+ reg = <0x0af00000 0x200000>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_DISP_GPLL0_CLK_SRC>,
<&dsi_phy 0>,
diff --git a/Bindings/clock/qcom,sc7180-gpucc.yaml b/Bindings/clock/qcom,sc7180-gpucc.yaml
index 8635e35fd3f0..fe08461fce05 100644
--- a/Bindings/clock/qcom,sc7180-gpucc.yaml
+++ b/Bindings/clock/qcom,sc7180-gpucc.yaml
@@ -60,7 +60,7 @@ examples:
#include
clock-controller@5090000 {
compatible = "qcom,sc7180-gpucc";
- reg = <0 0x05090000 0 0x9000>;
+ reg = <0x05090000 0x9000>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_GPU_GPLL0_CLK_SRC>,
<&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>;
diff --git a/Bindings/clock/qcom,sc7180-mss.yaml b/Bindings/clock/qcom,sc7180-mss.yaml
index 0dd5d25ae7d7..970030986a86 100644
--- a/Bindings/clock/qcom,sc7180-mss.yaml
+++ b/Bindings/clock/qcom,sc7180-mss.yaml
@@ -50,7 +50,7 @@ examples:
#include
clock-controller@41a8000 {
compatible = "qcom,sc7180-mss";
- reg = <0 0x041a8000 0 0x8000>;
+ reg = <0x041a8000 0x8000>;
clocks = <&gcc GCC_MSS_MFAB_AXIS_CLK>,
<&gcc GCC_MSS_NAV_AXI_CLK>,
<&gcc GCC_MSS_CFG_AHB_CLK>;
diff --git a/Bindings/clock/qcom,sc7180-videocc.yaml b/Bindings/clock/qcom,sc7180-videocc.yaml
index 0071b9701960..2feea2b91aa9 100644
--- a/Bindings/clock/qcom,sc7180-videocc.yaml
+++ b/Bindings/clock/qcom,sc7180-videocc.yaml
@@ -55,7 +55,7 @@ examples:
#include