summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/ao-cad-aarch64-support.patch18
-rw-r--r--gnu/packages/patches/blender-newer-ffmpeg.patch80
-rw-r--r--gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch33
-rw-r--r--gnu/packages/patches/cool-retro-term-fix-array-size.patch25
-rw-r--r--gnu/packages/patches/cool-retro-term-memory-leak-1.patch32
-rw-r--r--gnu/packages/patches/glibc-memchr-overflow-i686.patch74
-rw-r--r--gnu/packages/patches/hdf5-1.8-mpi-deprecations.patch169
-rw-r--r--gnu/packages/patches/hdf5-mpi-deprecations.patch61
-rw-r--r--gnu/packages/patches/mcron-install.patch22
-rw-r--r--gnu/packages/patches/musescore-fix-use_webengine.patch165
-rw-r--r--gnu/packages/patches/net-tools-bitrot.patch108
-rw-r--r--gnu/packages/patches/nyx-show-header-stats-with-python3.patch70
-rw-r--r--gnu/packages/patches/ocaml-findlib-make-install.patch20
-rw-r--r--gnu/packages/patches/ocaml-graph-honor-source-date-epoch.patch34
-rw-r--r--gnu/packages/patches/openldap-CVE-2017-9287.patch37
-rw-r--r--gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch16
-rw-r--r--gnu/packages/patches/readline-7.0-mingw.patch28
-rw-r--r--gnu/packages/patches/superlu-dist-fix-mpi-deprecations.patch57
-rw-r--r--gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch1485
-rw-r--r--gnu/packages/patches/u-boot-pinebook-dts.patch388
-rw-r--r--gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch98
-rw-r--r--gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch70
-rw-r--r--gnu/packages/patches/u-boot-pinebook-syscon-node.patch38
-rw-r--r--gnu/packages/patches/u-boot-pinebook-video-bridge.patch50
-rw-r--r--gnu/packages/patches/xboing-CVE-2004-0149.patch134
25 files changed, 452 insertions, 2860 deletions
diff --git a/gnu/packages/patches/ao-cad-aarch64-support.patch b/gnu/packages/patches/ao-cad-aarch64-support.patch
deleted file mode 100644
index 291369cd9b..0000000000
--- a/gnu/packages/patches/ao-cad-aarch64-support.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Support in ao-cad for aarch64.
-
-Submitted upstream at https://github.com/mkeeter/ao/issues/69
-
---- ao/ui/vendor/efsw/src/efsw/inotify-nosys.h.orig 2017-12-14 16:27:16.125871099 -0600
-+++ ao/ui/vendor/efsw/src/efsw/inotify-nosys.h 2017-12-14 16:26:39.786022981 -0600
-@@ -69,6 +69,11 @@
- # define __NR_inotify_add_watch (__NR_SYSCALL_BASE+317)
- # define __NR_inotify_rm_watch (__NR_SYSCALL_BASE+318)
-
-+#elif defined (__aarch64__)
-+# define __NR_inotify_init 1043
-+# define __NR_inotify_add_watch 27
-+# define __NR_inotify_rm_watch 28
-+
- #elif defined (__frv__)
- # define __NR_inotify_init 291
- # define __NR_inotify_add_watch 292
diff --git a/gnu/packages/patches/blender-newer-ffmpeg.patch b/gnu/packages/patches/blender-newer-ffmpeg.patch
deleted file mode 100644
index 363489bc70..0000000000
--- a/gnu/packages/patches/blender-newer-ffmpeg.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-https://sources.debian.org/data/main/b/blender/2.79.b+dfsg0-4/debian/patches/0008-fix_building_with_latest_versions_of_FFmpeg.patch
-
-From: Bastien Montagne <montagne29@wanadoo.fr>
-Date: Tue, 8 May 2018 16:00:52 +0200
-Subject: fix_building_with_latest_versions_of_FFmpeg
-
-Some years-old deprecated stuff has now been removed.
-
-Correct solution is probably to use valid defines etc. in own code, but
-this is more FFMEPG maintainer task (since it also may change how old
-FFMPEG we do support...).
----
- intern/ffmpeg/ffmpeg_compat.h | 39 ++++++++++++++++++++++++++
- source/blender/blenkernel/intern/writeffmpeg.c | 3 +-
- 2 files changed, 41 insertions(+), 1 deletion(-)
-
-diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
-index 9c06c8a..f7f437c 100644
---- a/intern/ffmpeg/ffmpeg_compat.h
-+++ b/intern/ffmpeg/ffmpeg_compat.h
-@@ -109,6 +109,45 @@ int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
-
- #endif
-
-+/* XXX TODO Probably fix to correct modern flags in code? Not sure how old FFMPEG we want to support though,
-+ * so for now this will do. */
-+
-+#ifndef FF_MIN_BUFFER_SIZE
-+# ifdef AV_INPUT_BUFFER_MIN_SIZE
-+# define FF_MIN_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE
-+# endif
-+#endif
-+
-+#ifndef FF_INPUT_BUFFER_PADDING_SIZE
-+# ifdef AV_INPUT_BUFFER_PADDING_SIZE
-+# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE
-+# endif
-+#endif
-+
-+#ifndef CODEC_FLAG_GLOBAL_HEADER
-+# ifdef AV_CODEC_FLAG_GLOBAL_HEADER
-+# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
-+# endif
-+#endif
-+
-+#ifndef CODEC_FLAG_GLOBAL_HEADER
-+# ifdef AV_CODEC_FLAG_GLOBAL_HEADER
-+# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
-+# endif
-+#endif
-+
-+#ifndef CODEC_FLAG_INTERLACED_DCT
-+# ifdef AV_CODEC_FLAG_INTERLACED_DCT
-+# define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT
-+# endif
-+#endif
-+
-+#ifndef CODEC_FLAG_INTERLACED_ME
-+# ifdef AV_CODEC_FLAG_INTERLACED_ME
-+# define CODEC_FLAG_INTERLACED_ME AV_CODEC_FLAG_INTERLACED_ME
-+# endif
-+#endif
-+
- /* FFmpeg upstream 1.0 is the first who added AV_ prefix. */
- #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 59, 100)
- # define AV_CODEC_ID_NONE CODEC_ID_NONE
-diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
-index a19e414..04d508a 100644
---- a/source/blender/blenkernel/intern/writeffmpeg.c
-+++ b/source/blender/blenkernel/intern/writeffmpeg.c
-@@ -605,7 +605,8 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int
- c->rc_buffer_aggressivity = 1.0;
- #endif
-
-- c->me_method = ME_EPZS;
-+ /* Deprecated and not doing anything since July 2015, deleted in recent ffmpeg */
-+ //c->me_method = ME_EPZS;
-
- codec = avcodec_find_encoder(c->codec_id);
- if (!codec)
diff --git a/gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch b/gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch
deleted file mode 100644
index c6e1d27315..0000000000
--- a/gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 126a97d1f22f7d784d392b2b7d5aadf0a4e18c0d Mon Sep 17 00:00:00 2001
-From: Petter <petter@mykolab.ch>
-Date: Thu, 27 Apr 2017 20:28:02 +0200
-Subject: [PATCH] Avoid checking uninitialized member + simplify condition
-
----
- qmltermwidget/lib/TerminalDisplay.cpp | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/qmltermwidget/lib/TerminalDisplay.cpp b/qmltermwidget/lib/TerminalDisplay.cpp
-index 189a609..36d2cd2 100644
---- a/qmltermwidget/lib/TerminalDisplay.cpp
-+++ b/qmltermwidget/lib/TerminalDisplay.cpp
-@@ -325,6 +325,7 @@ TerminalDisplay::TerminalDisplay(QQuickItem *parent)
- ,_terminalSizeHint(false)
- ,_terminalSizeStartup(true)
- ,_bidiEnabled(false)
-+,_mouseMarks(false)
- ,_actSel(0)
- ,_wordSelectionMode(false)
- ,_lineSelectionMode(false)
-@@ -1846,7 +1847,7 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
- }
- else if ( ev->button() == Qt::MidButton )
- {
-- if ( _mouseMarks || (!_mouseMarks && (ev->modifiers() & Qt::ShiftModifier)) )
-+ if ( _mouseMarks || (ev->modifiers() & Qt::ShiftModifier) )
- emitSelection(true,ev->modifiers() & Qt::ControlModifier);
- else
- emit mouseSignal( 1, charColumn +1, charLine +1 +_scrollBar->value() -_scrollBar->maximum() , 0);
---
-2.12.2
-
diff --git a/gnu/packages/patches/cool-retro-term-fix-array-size.patch b/gnu/packages/patches/cool-retro-term-fix-array-size.patch
deleted file mode 100644
index 04a2a27971..0000000000
--- a/gnu/packages/patches/cool-retro-term-fix-array-size.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From c91d7ae5dbb00c8392a9f93283dc56c3e296cccd Mon Sep 17 00:00:00 2001
-From: Petter <petter@mykolab.ch>
-Date: Thu, 27 Apr 2017 20:19:21 +0200
-Subject: [PATCH] Fix size of the array passed to memset()
-
----
- qmltermwidget/lib/History.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/qmltermwidget/lib/History.cpp b/qmltermwidget/lib/History.cpp
-index 0f9c13f..ab6f7be 100644
---- a/qmltermwidget/lib/History.cpp
-+++ b/qmltermwidget/lib/History.cpp
-@@ -515,7 +515,7 @@ void HistoryScrollBlockArray::addCells(const Character a[], int count)
- // put cells in block's data
- assert((count * sizeof(Character)) < ENTRIES);
-
-- memset(b->data, 0, ENTRIES);
-+ memset(b->data, 0, sizeof(b->data));
-
- memcpy(b->data, a, count * sizeof(Character));
- b->size = count * sizeof(Character);
---
-2.12.2
-
diff --git a/gnu/packages/patches/cool-retro-term-memory-leak-1.patch b/gnu/packages/patches/cool-retro-term-memory-leak-1.patch
deleted file mode 100644
index f3fbac17de..0000000000
--- a/gnu/packages/patches/cool-retro-term-memory-leak-1.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 08628fda19128b75248548357e416bc373f14f91 Mon Sep 17 00:00:00 2001
-From: Yen Chi Hsuan <yan12125@gmail.com>
-Date: Sat, 18 Mar 2017 02:50:34 +0800
-Subject: [PATCH] Fix memory leak in hotspot (URLs & emails) detection
-
----
- qmltermwidget/lib/Filter.cpp | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/qmltermwidget/lib/Filter.cpp b/qmltermwidget/lib/Filter.cpp
-index 5ca7bee..2e8d2fb 100644
---- a/qmltermwidget/lib/Filter.cpp
-+++ b/qmltermwidget/lib/Filter.cpp
-@@ -26,6 +26,7 @@
- // Qt
- #include <QAction>
- #include <QApplication>
-+#include <QtAlgorithms>
- #include <QClipboard>
- #include <QString>
- #include <QTextStream>
-@@ -194,6 +195,7 @@ Filter::~Filter()
- }
- void Filter::reset()
- {
-+ qDeleteAll(_hotspotList);
- _hotspots.clear();
- _hotspotList.clear();
- }
---
-2.12.2
-
diff --git a/gnu/packages/patches/glibc-memchr-overflow-i686.patch b/gnu/packages/patches/glibc-memchr-overflow-i686.patch
deleted file mode 100644
index 0b1b5b9f96..0000000000
--- a/gnu/packages/patches/glibc-memchr-overflow-i686.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-Extracted from glibc upstream git repository. Changes to the ChangeLog have
-been removed. This patch is needed to fix spurious segmentation faults on
-i686.
-
-From 3abeeec5f46ff036bd9df60bb096e20314ccd078 Mon Sep 17 00:00:00 2001
-From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-Date: Tue, 14 Mar 2017 14:16:13 -0300
-Subject: [PATCH] Fix i686 memchr overflow calculation (BZ#21182)
-
-This patch fixes the regression added by 23d2770 for final address
-overflow calculation. The subtraction of the considered size (16)
-at line 120 is at wrong place, for sizes less than 16 subsequent
-overflow check will not take in consideration an invalid size (since
-the subtraction will be negative). Also, the lea instruction also
-does not raise the carry flag (CF) that is used in subsequent jbe
-to check for overflow.
-
-The fix is to follow x86_64 logic from 3daef2c where the overflow
-is first check and a sub instruction is issued. In case of resulting
-negative size, CF will be set by the sub instruction and a NULL
-result will be returned. The patch also add similar tests reported
-in bug report.
-
-Checked on i686-linux-gnu and x86_64-linux-gnu.
-
- * string/test-memchr.c (do_test): Add BZ#21182 checks for address
- near end of a page.
- * sysdeps/i386/i686/multiarch/memchr-sse2.S (__memchr): Fix
- overflow calculation.
----
- string/test-memchr.c | 6 ++++++
- sysdeps/i386/i686/multiarch/memchr-sse2.S | 2 +-
- 3 files changed, 15 insertions(+), 1 deletion(-)
-
-diff --git a/string/test-memchr.c b/string/test-memchr.c
-index 2403c9242b..669e092e7d 100644
---- a/string/test-memchr.c
-+++ b/string/test-memchr.c
-@@ -210,6 +210,12 @@ test_main (void)
- do_test (0, i, i + 1, i + 1, 0);
- }
-
-+ /* BZ#21182 - wrong overflow calculation for i686 implementation
-+ with address near end of the page. */
-+ for (i = 2; i < 16; ++i)
-+ /* page_size is in fact getpagesize() * 2. */
-+ do_test (page_size / 2 - i, i, i, 1, 0x9B);
-+
- do_random_tests ();
- return ret;
- }
-diff --git a/sysdeps/i386/i686/multiarch/memchr-sse2.S b/sysdeps/i386/i686/multiarch/memchr-sse2.S
-index 910679cfc0..e41f324a77 100644
---- a/sysdeps/i386/i686/multiarch/memchr-sse2.S
-+++ b/sysdeps/i386/i686/multiarch/memchr-sse2.S
-@@ -117,7 +117,6 @@ L(crosscache):
-
- # ifndef USE_AS_RAWMEMCHR
- jnz L(match_case2_prolog1)
-- lea -16(%edx), %edx
- /* Calculate the last acceptable address and check for possible
- addition overflow by using satured math:
- edx = ecx + edx
-@@ -125,6 +124,7 @@ L(crosscache):
- add %ecx, %edx
- sbb %eax, %eax
- or %eax, %edx
-+ sub $16, %edx
- jbe L(return_null)
- lea 16(%edi), %edi
- # else
---
-2.12.2
-
diff --git a/gnu/packages/patches/hdf5-1.8-mpi-deprecations.patch b/gnu/packages/patches/hdf5-1.8-mpi-deprecations.patch
new file mode 100644
index 0000000000..29242dc4e8
--- /dev/null
+++ b/gnu/packages/patches/hdf5-1.8-mpi-deprecations.patch
@@ -0,0 +1,169 @@
+--- a/src/H5.c
++++ b/src/H5.c
+@@ -138,7 +138,7 @@
+ if (mpi_initialized && !mpi_finalized) {
+ int key_val;
+
+- if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_NULL_COPY_FN,
++ if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_COMM_NULL_COPY_FN,
+ (MPI_Comm_delete_attr_function *)H5_mpi_delete_cb,
+ &key_val, NULL)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Comm_create_keyval failed", mpi_code)
+--- hdf5-1.8.19/testpar/t_cache.c
++++ hdf5-1.8.19/testpar/t_cache.c
+@@ -1187,20 +1187,20 @@
+ struct mssg_t sample; /* used to compute displacements */
+
+ /* setup the displacements array */
+- if ( ( MPI_SUCCESS != MPI_Address(&sample.req, &displs[0]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.src, &displs[1]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.dest, &displs[2]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.mssg_num, &displs[3]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.base_addr, &displs[4]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.len, &displs[5]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.ver, &displs[6]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.count, &displs[7]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.magic, &displs[8]) ) ) {
++ if ( ( MPI_SUCCESS != MPI_Get_address(&sample.req, &displs[0]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.src, &displs[1]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.dest, &displs[2]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.mssg_num, &displs[3]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.base_addr, &displs[4]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.len, &displs[5]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.ver, &displs[6]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.count, &displs[7]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.magic, &displs[8]) ) ) {
+
+ nerrors++;
+ success = FALSE;
+ if ( verbose ) {
+- HDfprintf(stdout, "%d:%s: MPI_Address() call failed.\n",
++ HDfprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n",
+ world_mpi_rank, fcn_name);
+ }
+
+@@ -1215,14 +1215,14 @@
+
+ if ( success ) {
+
+- result = MPI_Type_struct(9, block_len, displs, mpi_types, &mpi_mssg_t);
++ result = MPI_Type_create_struct(9, block_len, displs, mpi_types, &mpi_mssg_t);
+
+ if ( result != MPI_SUCCESS ) {
+
+ nerrors++;
+ success = FALSE;
+ if ( verbose ) {
+- HDfprintf(stdout, "%d:%s: MPI_Type_struct() call failed.\n",
++ HDfprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n",
+ world_mpi_rank, fcn_name);
+ }
+ }
+--- hdf5-1.8.19/testpar/t_mpi.c
++++ hdf5-1.8.19/testpar/t_mpi.c
+@@ -279,7 +279,7 @@
+ printf("Skipped GB file range test "
+ "because MPI_Offset cannot support it\n");
+ }else{
+- buf = HDmalloc(MB);
++ buf = (char *)HDmalloc(MB);
+ VRFY((buf!=NULL), "malloc succeed");
+
+ /* open a new file. Remove it first in case it exists. */
+@@ -624,7 +624,7 @@
+ and this platform.
+
+ 1. Details for the test:
+-1) Create two derived datatypes with MPI_Type_hindexed:
++1) Create two derived datatypes with MPI_Type_create_hindexed:
+ datatype1:
+ count = 1, blocklens = 1, offsets = 0,
+ base type = MPI_BYTE(essentially a char)
+@@ -633,7 +633,7 @@
+ base type = MPI_BYTE
+
+ 2) Using these two derived datatypes,
+- Build another derived datatype with MPI_Type_struct:
++ Build another derived datatype with MPI_Type_create_struct:
+ advtype: derived from datatype1 and datatype2
+ advtype:
+ count = 2, blocklens[0] = 1, blocklens[1]=1,
+@@ -676,10 +676,9 @@
+ int mpi_err_strlen;
+ int mpi_err;
+ int i;
+- int nerrors = 0; /* number of errors */
+ MPI_Datatype etype,filetype;
+ MPI_Datatype adv_filetype,bas_filetype[2];
+- MPI_Datatype etypenew, filetypenew;
++ MPI_Datatype filetypenew;
+ MPI_Offset disp;
+ MPI_Status Status;
+ MPI_Aint adv_disp[2];
+@@ -715,7 +714,7 @@
+ blocklens[0] = 1;
+ offsets[0] = 0;
+
+- if((mpi_err= MPI_Type_hindexed(count,blocklens,offsets,MPI_BYTE,&filetype))
++ if((mpi_err= MPI_Type_create_hindexed(count,blocklens,offsets,MPI_BYTE,&filetype))
+ != MPI_SUCCESS){
+ MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
+ printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
+@@ -731,7 +730,7 @@
+ count = 1;
+ blocklens[0]=1;
+ offsets[0] = 1;
+- if((mpi_err= MPI_Type_hindexed(count,blocklens,offsets,MPI_BYTE,&filetypenew))
++ if((mpi_err= MPI_Type_create_hindexed(count,blocklens,offsets,MPI_BYTE,&filetypenew))
+ != MPI_SUCCESS){
+ MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
+ printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
+@@ -752,10 +751,10 @@
+ bas_filetype[0] = filetype;
+ bas_filetype[1] = filetypenew;
+
+- if((mpi_err= MPI_Type_struct(outcount,adv_blocklens,adv_disp,bas_filetype,&adv_filetype))
++ if((mpi_err= MPI_Type_create_struct(outcount,adv_blocklens,adv_disp,bas_filetype,&adv_filetype))
+ != MPI_SUCCESS){
+ MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
+- printf("MPI_Type_struct failed (%s)\n", mpi_err_str);
++ printf("MPI_Type_create_struct failed (%s)\n", mpi_err_str);
+ return 1;
+ }
+ if((mpi_err=MPI_Type_commit(&adv_filetype))!=MPI_SUCCESS){
+@@ -842,7 +841,7 @@
+ processes are needed.
+
+ 1. Details for the test:
+-1) Create one derived datatype with MPI_Type_hindexed:
++1) Create one derived datatype with MPI_Type_create_hindexed:
+
+ 2) Choosing at least two processes to contribute none for IO with
+ the buf size inside MPI_Write_at_all to 0.
+@@ -898,7 +897,7 @@
+ offsets[1] = (mpi_size+mpi_rank)*count;
+
+ if(count !=0) {
+- if((mpi_err = MPI_Type_hindexed(2,
++ if((mpi_err = MPI_Type_create_hindexed(2,
+ blocklens,
+ offsets,
+ etype,
+@@ -914,7 +913,7 @@
+ return 1;
+ } /* end if */
+
+- if((mpi_err = MPI_Type_hindexed(2,
++ if((mpi_err = MPI_Type_create_hindexed(2,
+ blocklens,
+ offsets,
+ etype,
+@@ -1098,7 +1097,7 @@
+ * calls. By then, MPI calls may not work.
+ */
+ if (H5dont_atexit() < 0){
+- printf("Failed to turn off atexit processing. Continue.\n", mpi_rank);
++ printf("Failed to turn off atexit processing. Continue.\n");
+ };
+ H5open();
+ if (parse_options(argc, argv) != 0){
diff --git a/gnu/packages/patches/hdf5-mpi-deprecations.patch b/gnu/packages/patches/hdf5-mpi-deprecations.patch
new file mode 100644
index 0000000000..eb5d1cb681
--- /dev/null
+++ b/gnu/packages/patches/hdf5-mpi-deprecations.patch
@@ -0,0 +1,61 @@
+--- a/src/H5.c
++++ b/src/H5.c
+@@ -138,7 +138,7 @@
+ if (mpi_initialized && !mpi_finalized) {
+ int key_val;
+
+- if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_NULL_COPY_FN,
++ if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_COMM_NULL_COPY_FN,
+ (MPI_Comm_delete_attr_function *)H5_mpi_delete_cb,
+ &key_val, NULL)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Comm_create_keyval failed", mpi_code)
+--- hdf5-1.10.4/testpar/t_cache.c
++++ hdf5-1.10.4/testpar/t_cache.c
+@@ -1217,20 +1217,20 @@
+ struct mssg_t sample; /* used to compute displacements */
+
+ /* setup the displacements array */
+- if ( ( MPI_SUCCESS != MPI_Address(&sample.req, &displs[0]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.src, &displs[1]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.dest, &displs[2]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.mssg_num, &displs[3]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.base_addr, &displs[4]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.len, &displs[5]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.ver, &displs[6]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.count, &displs[7]) ) ||
+- ( MPI_SUCCESS != MPI_Address(&sample.magic, &displs[8]) ) ) {
++ if ( ( MPI_SUCCESS != MPI_Get_address(&sample.req, &displs[0]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.src, &displs[1]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.dest, &displs[2]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.mssg_num, &displs[3]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.base_addr, &displs[4]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.len, &displs[5]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.ver, &displs[6]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.count, &displs[7]) ) ||
++ ( MPI_SUCCESS != MPI_Get_address(&sample.magic, &displs[8]) ) ) {
+
+ nerrors++;
+ success = FALSE;
+ if ( verbose ) {
+- HDfprintf(stdout, "%d:%s: MPI_Address() call failed.\n",
++ HDfprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n",
+ world_mpi_rank, FUNC);
+ }
+
+@@ -1245,14 +1245,14 @@
+
+ if ( success ) {
+
+- result = MPI_Type_struct(9, block_len, displs, mpi_types, &mpi_mssg_t);
++ result = MPI_Type_create_struct(9, block_len, displs, mpi_types, &mpi_mssg_t);
+
+ if ( result != MPI_SUCCESS ) {
+
+ nerrors++;
+ success = FALSE;
+ if ( verbose ) {
+- HDfprintf(stdout, "%d:%s: MPI_Type_struct() call failed.\n",
++ HDfprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n",
+ world_mpi_rank, FUNC);
+ }
+ }
diff --git a/gnu/packages/patches/mcron-install.patch b/gnu/packages/patches/mcron-install.patch
deleted file mode 100644
index 3cd291f576..0000000000
--- a/gnu/packages/patches/mcron-install.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-This patch allows us to install the Vixie-compatible binaries as
-non-root without creating /var/run, etc.
-
---- mcron-1.0.6/makefile.in 2010-06-19 20:44:17.000000000 +0200
-+++ mcron-1.0.6/makefile.in 2010-07-04 16:16:25.000000000 +0200
-@@ -1004,15 +1004,11 @@ mcron.c : main.scm crontab.scm makefile.
- @rm -f mcron.escaped.scm > /dev/null 2>&1
-
- install-exec-hook:
-- @if [ "x@NO_VIXIE_CLOBBER@" != "xyes" -a "`id -u`" -eq "0" ]; then \
-+ @if [ "x@NO_VIXIE_CLOBBER@" != "xyes" ]; then \
- rm -f $(fpp)cron$(EXEEXT) > /dev/null 2>&1; \
- $(INSTALL) --mode='u=rwx' mcron$(EXEEXT) $(fpp)cron$(EXEEXT); \
- rm -f $(fpp)crontab$(EXEEXT) > /dev/null 2>&1; \
- $(INSTALL) --mode='u=rwxs,og=rx' mcron$(EXEEXT) $(fpp)crontab$(EXEEXT); \
-- $(INSTALL) -d --mode='u=rwx' $(DESTDIR)/var/cron; \
-- $(INSTALL) -d --mode='u=rwx,og=rx' $(DESTDIR)/var/run; \
-- $(INSTALL) -d --mode='u=rwx,og=rx' $(DESTDIR)@GUILE_SITE@; \
-- $(INSTALL) -d --mode='u=rwx,og=rx' $(DESTDIR)@GUILE_SITE@/mcron; \
- elif [ "x@NO_VIXIE_CLOBBER@" = "xyes" ]; then \
- echo "Not installing Vixie-style programs"; \
- else \
diff --git a/gnu/packages/patches/musescore-fix-use_webengine.patch b/gnu/packages/patches/musescore-fix-use_webengine.patch
new file mode 100644
index 0000000000..b0b8216a42
--- /dev/null
+++ b/gnu/packages/patches/musescore-fix-use_webengine.patch
@@ -0,0 +1,165 @@
+From bb0c1a9b4940f3f6b52c0df535289ec8a3bc9e03 Mon Sep 17 00:00:00 2001
+From: Dmitri Ovodok <dmitrio95@yandex.ru>
+Date: Mon, 4 Feb 2019 21:35:25 +0300
+Subject: [PATCH] Fix build without USE_WEBENGINE and SCRIPT_INTERFACE
+
+Old-style login dialog is used if USE_WEBENGINE is turned off
+---
+ mscore/logindialog.h | 2 ++
+ mscore/musescore.cpp | 4 +++-
+ mscore/network/loginmanager.cpp | 13 +++++++++++--
+ mscore/network/loginmanager.h | 4 ++++
+ mscore/network/loginmanager_p.h | 4 ++++
+ 5 files changed, 24 insertions(+), 3 deletions(-)
+
+diff --git a/mscore/logindialog.h b/mscore/logindialog.h
+index 4e86ae7985..f44511d8c0 100644
+--- a/mscore/logindialog.h
++++ b/mscore/logindialog.h
+@@ -21,6 +21,8 @@ class LoginManager;
+
+ //---------------------------------------------------------
+ // LoginDialog
++// Old-style login dialog in case QtWebEngine is
++// unavailable.
+ //---------------------------------------------------------
+
+ class LoginDialog : public QDialog, public Ui::LoginDialog
+diff --git a/mscore/musescore.cpp b/mscore/musescore.cpp
+index 80c712aea9..5bb8354992 100644
+--- a/mscore/musescore.cpp
++++ b/mscore/musescore.cpp
+@@ -7572,12 +7572,14 @@ bool MuseScore::exportPartsPdfsToJSON(const QString& inFilePath, const QString&
+ }
+
+ //---------------------------------------------------------
+-// getQmlEngine
++// getPluginEngine
+ //---------------------------------------------------------
+
++#ifdef SCRIPT_INTERFACE
+ QmlPluginEngine* MuseScore::getPluginEngine()
+ {
+ if (!_qmlEngine)
+ _qmlEngine = new QmlPluginEngine(this);
+ return _qmlEngine;
+ }
++#endif
+diff --git a/mscore/network/loginmanager.cpp b/mscore/network/loginmanager.cpp
+index a53d7fe811..664786ccc8 100644
+--- a/mscore/network/loginmanager.cpp
++++ b/mscore/network/loginmanager.cpp
+@@ -18,7 +18,9 @@
+ #include "kQOAuth/kqoauthrequest.h"
+ #include "kQOAuth/kqoauthrequest_xauth.h"
+
++#ifdef USE_WEBENGINE
+ #include <QWebEngineCookieStore>
++#endif
+
+ namespace Ms {
+
+@@ -286,8 +288,11 @@ void LoginManager::onTryLoginError(const QString& error)
+ disconnect(this, SIGNAL(getUserError(QString)), this, SLOT(onTryLoginError(QString)));
+ connect(this, SIGNAL(loginSuccess()), this, SLOT(tryLogin()));
+ logout();
++#ifdef USE_WEBENGINE
+ loginInteractive();
+-// mscore->showLoginDialog(); // TODO: switch depending on USE_WEBENGINE
++#else
++ mscore->showLoginDialog();
++#endif
+ }
+ /*------- END - TRY LOGIN ROUTINES ----------------------------*/
+
+@@ -295,6 +300,7 @@ void LoginManager::onTryLoginError(const QString& error)
+ // loginInteractive
+ //---------------------------------------------------------
+
++#ifdef USE_WEBENGINE
+ void LoginManager::loginInteractive()
+ {
+ QWebEngineView* webView = new QWebEngineView;
+@@ -326,6 +332,7 @@ void LoginManager::loginInteractive()
+ webView->load(ApiInfo::loginUrl);
+ webView->show();
+ }
++#endif
+
+ //---------------------------------------------------------
+ // login
+@@ -346,7 +353,7 @@ void LoginManager::login(QString login, QString password)
+ connect(reply, &QNetworkReply::finished, this, [this, reply] {
+ onReplyFinished(reply, RequestType::LOGIN);
+ });
+- }
++ }
+
+ //---------------------------------------------------------
+ // onLoginSuccessReply
+@@ -874,6 +881,7 @@ ApiRequest ApiRequestBuilder::build() const
+ // musescore.com
+ //---------------------------------------------------------
+
++#ifdef USE_WEBENGINE
+ void ApiWebEngineRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo& request)
+ {
+ const ApiInfo& apiInfo = ApiInfo::instance();
+@@ -881,4 +889,5 @@ void ApiWebEngineRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo&
+ request.setHttpHeader(apiInfo.clientIdHeader, apiInfo.clientId);
+ request.setHttpHeader(apiInfo.apiKeyHeader, apiInfo.apiKey);
+ }
++#endif
+ }
+diff --git a/mscore/network/loginmanager.h b/mscore/network/loginmanager.h
+index 584eeea30d..327d9fc966 100644
+--- a/mscore/network/loginmanager.h
++++ b/mscore/network/loginmanager.h
+@@ -13,6 +13,8 @@
+ #ifndef __LOGINMANAGER_H__
+ #define __LOGINMANAGER_H__
+
++#include "config.h"
++
+ namespace Ms {
+
+ //---------------------------------------------------------
+@@ -83,7 +85,9 @@ class LoginManager : public QObject
+ public:
+ LoginManager(QAction* uploadAudioMenuAction, QObject* parent = 0);
+ void login(QString login, QString password);
++#ifdef USE_WEBENGINE
+ void loginInteractive();
++#endif
+ void upload(const QString& path, int nid, const QString& title, const QString& description, const QString& priv, const QString& license, const QString& tags, const QString& changes);
+ bool hasAccessToken();
+ void getUser();
+diff --git a/mscore/network/loginmanager_p.h b/mscore/network/loginmanager_p.h
+index 88228a3958..2848dde35a 100644
+--- a/mscore/network/loginmanager_p.h
++++ b/mscore/network/loginmanager_p.h
+@@ -20,6 +20,8 @@
+ #ifndef __LOGINMANAGER_P_H__
+ #define __LOGINMANAGER_P_H__
+
++#include "config.h"
++
+ namespace Ms {
+
+ //---------------------------------------------------------
+@@ -102,6 +104,7 @@ class ApiRequestBuilder
+ // ApiWebEngineRequestInterceptor
+ //---------------------------------------------------------
+
++#ifdef USE_WEBENGINE
+ class ApiWebEngineRequestInterceptor : public QWebEngineUrlRequestInterceptor
+ {
+ Q_OBJECT
+@@ -109,6 +112,7 @@ class ApiWebEngineRequestInterceptor : public QWebEngineUrlRequestInterceptor
+ ApiWebEngineRequestInterceptor(QObject* parent) : QWebEngineUrlRequestInterceptor(parent) {}
+ void interceptRequest(QWebEngineUrlRequestInfo& info) override;
+ };
++#endif
+
+ //---------------------------------------------------------
+ // HttpStatus
diff --git a/gnu/packages/patches/net-tools-bitrot.patch b/gnu/packages/patches/net-tools-bitrot.patch
deleted file mode 100644
index 89ab6f19eb..0000000000
--- a/gnu/packages/patches/net-tools-bitrot.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-Starting with libc 2.20, this file would fail to build with "NULL undeclared".
-Include the fine header to solve that.
-
---- net-tools-1.60/lib/ec_hw.c 1999-11-20 22:02:53.000000000 +0100
-+++ net-tools-1.60/lib/ec_hw.c 2014-10-06 22:48:43.811027768 +0200
-@@ -16,6 +16,7 @@
-
- #if HAVE_HWEC
-
-+#include <stddef.h>
- #include <net/if_arp.h>
- #include "net-support.h"
-
-
-Avoid "label at end of compound statement" errors.
-
---- net-tools-1.60/lib/inet_sr.c 2000-02-20 22:46:45.000000000 +0100
-+++ net-tools-1.60/lib/inet_sr.c 2014-10-06 22:51:22.575023126 +0200
-@@ -104,7 +104,6 @@ static int INET_setroute(int action, int
- isnet = 1; break;
- case 2:
- isnet = 0; break;
-- default:
- }
-
- /* Fill in the other fields. */
-
---- net-tools-1.60/hostname.c 2001-04-08 19:04:23.000000000 +0200
-+++ net-tools-1.60/hostname.c 2014-10-06 23:01:04.235006119 +0200
-@@ -77,7 +77,6 @@ static void setnname(char *nname)
- case EINVAL:
- fprintf(stderr, _("%s: name too long\n"), program_name);
- break;
-- default:
- }
- exit(1);
- }
-@@ -97,7 +96,6 @@ static void sethname(char *hname)
- case EINVAL:
- fprintf(stderr, _("%s: name too long\n"), program_name);
- break;
-- default:
- }
- exit(1);
- };
-@@ -116,7 +114,6 @@ static void setdname(char *dname)
- case EINVAL:
- fprintf(stderr, _("%s: name too long\n"), program_name);
- break;
-- default:
- }
- exit(1);
- };
-@@ -173,7 +170,6 @@ static void showhname(char *hname, int c
- *p = '\0';
- printf("%s\n", hp->h_name);
- break;
-- default:
- }
- }
-
-
-Work around the assumption that an 'x25_address' typedef exists.
-
---- net-tools-1.60/lib/x25_sr.c 2000-05-20 15:38:10.000000000 +0200
-+++ net-tools-1.60/lib/x25_sr.c 2014-10-06 22:59:35.787008705 +0200
-@@ -77,7 +77,7 @@ static int X25_setroute(int action, int
- rt.sigdigits=sigdigits;
-
- /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */
-- memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address));
-+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address));
-
- while (*args) {
- if (!strcmp(*args,"device") || !strcmp(*args,"dev")) {
-
-
-Fix the multi-line string literal syntax.
-
---- net-tools-1.60/mii-tool.c 2000-05-21 16:31:17.000000000 +0200
-+++ net-tools-1.60/mii-tool.c 2014-10-06 23:07:42.002994489 +0200
-@@ -379,16 +379,16 @@ static void watch_one_xcvr(int skfd, cha
- /*--------------------------------------------------------------------*/
-
- const char *usage =
--"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]
-- -V, --version display version information
-- -v, --verbose more verbose output
-- -R, --reset reset MII to poweron state
-- -r, --restart restart autonegotiation
-- -w, --watch monitor for link status changes
-- -l, --log with -w, write events to syslog
-- -A, --advertise=media,... advertise only specified media
-- -F, --force=media force specified media technology
--media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,
-+"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n\
-+ -V, --version display version information\n\
-+ -v, --verbose more verbose output\n\
-+ -R, --reset reset MII to poweron state\n\
-+ -r, --restart restart autonegotiation\n\
-+ -w, --watch monitor for link status changes\n\
-+ -l, --log with -w, write events to syslog\n\
-+ -A, --advertise=media,... advertise only specified media\n\
-+ -F, --force=media force specified media technology\n\
-+media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n\
- (to advertise both HD and FD) 100baseTx, 10baseT\n";
-
- int main(int argc, char **argv)
diff --git a/gnu/packages/patches/nyx-show-header-stats-with-python3.patch b/gnu/packages/patches/nyx-show-header-stats-with-python3.patch
deleted file mode 100644
index 5b20f180f7..0000000000
--- a/gnu/packages/patches/nyx-show-header-stats-with-python3.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From: Tobias Geerinckx-Rice <me@tobias.gr>
-Date: Fri, 22 Jun 2018 02:56:39 +0200
-Subject: nyx: Show header stats.
-
-The following patch was taken verbatim from the upstream repository and
-will be included in the next release.
----
-commit 3494111cc81ad4985e81d0c1ea5e451d8f7a2bcc
-Author: Damian Johnson <atagar@torproject.org>
-Date: Mon Feb 5 20:07:40 2018 -0800
-
- Header stats missing with python3
-
- Ick! took me a while to find this. Python3 changed division from providing ints
- to floats. This in turn caused our header panel to call addstr with float x/y
- coordinates, which made that funciton fail silently. End result is that when
- the header panel showed two columns of stats the right column was missing.
-
- Caught thanks to Stijn.
-
-diff --git a/nyx/panel/header.py b/nyx/panel/header.py
-index 09e3838..fb6f2f7 100644
---- a/nyx/panel/header.py
-+++ b/nyx/panel/header.py
-@@ -155,7 +155,7 @@ class HeaderPanel(nyx.panel.DaemonPanel):
- # space available for content
-
- interface = nyx_interface()
-- left_width = max(subwindow.width / 2, 77) if is_wide else subwindow.width
-+ left_width = max(subwindow.width // 2, 77) if is_wide else subwindow.width
- right_width = subwindow.width - left_width
-
- _draw_platform_section(subwindow, 0, 0, left_width, vals)
-diff --git a/web/changelog/index.html b/web/changelog/index.html
-index 333fa84..196d82b 100644
---- a/web/changelog/index.html
-+++ b/web/changelog/index.html
-@@ -74,6 +74,12 @@
- </ul>
- </li>
-
-+ <li><span class="component">Header</span>
-+ <ul>
-+ <li>Right column of stats missing when using python 3.x</li>
-+ </ul>
-+ </li>
-+
- <li><span class="component">Connections</span>
- <ul>
- <li>Geoip information unavailable for inbound connections</li>
-diff --git a/web/changelog/legacy.html b/web/changelog/legacy.html
-index a380806..02d405f 100644
---- a/web/changelog/legacy.html
-+++ b/web/changelog/legacy.html
-@@ -137,13 +137,13 @@
- </ul>
- </li>
-
-- <li><span class="component">Startup</span>
-+ <li><span class="component">Graph</span>
- <ul>
- <li>Crash when pausing if we showed accounting stats</li>
- </ul>
- </li>
-
-- <li><span class="component">Startup</span>
-+ <li><span class="component">Logging</span>
- <ul>
- <li>Skip reading from malformed tor log files</li>
- <li>Unable to log GUARD events</li>
diff --git a/gnu/packages/patches/ocaml-findlib-make-install.patch b/gnu/packages/patches/ocaml-findlib-make-install.patch
deleted file mode 100644
index 238f9ca3ce..0000000000
--- a/gnu/packages/patches/ocaml-findlib-make-install.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Ocaml wants to install its "core" libraries in OCAML_CORE_STDLIB. That
-does not work in a store-based distribution.
-
-A solution was already provided by Nix
-
- https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/ocaml/findlib/install_topfind.patch
-
-regenerated for Guix.
-
---- findlib-1.5.3/src/findlib/Makefile 2014-09-16 13:21:46.000000000 +0200
-+++ findlib-1.5.3/src/findlib/Makefile.new 2014-10-01 14:30:54.141082521 +0200
-@@ -89,7 +89,7 @@
- install: all
- mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)"
- mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
-- test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)"
-+ test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_SITELIB)"
- files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a findlib.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \
- cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)"
- f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \
diff --git a/gnu/packages/patches/ocaml-graph-honor-source-date-epoch.patch b/gnu/packages/patches/ocaml-graph-honor-source-date-epoch.patch
deleted file mode 100644
index 9f8713e3d3..0000000000
--- a/gnu/packages/patches/ocaml-graph-honor-source-date-epoch.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 354ef78aac0b887fae3c10b28eb2b0d83f66bdfe Mon Sep 17 00:00:00 2001
-From: Julien Lepiller <julien@lepiller.eu>
-Date: Mon, 2 Jan 2017 17:05:24 +0100
-Subject: [PATCH] Honor SOURCE_DATE_EPOCH
-
----
- Makefile.in | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index a32b4b8..ef4c174 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -113,11 +113,16 @@ graph.cmx: $(CMI) $(CMX)
- $(OCAMLOPT) $(INCLUDES) -pack -o $@ $^
-
- VERSION=1.8.7
-+ifdef SOURCE_DATE_EPOCH
-+BUILD_DATE=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" 2>/dev/null || date)
-+else
-+BUILD_DATE=$(shell date)
-+endif
-
- src/version.ml: Makefile
- rm -f $@
- echo "let version = \""$(VERSION)"\"" > $@
-- echo "let date = \""`date`"\"" >> $@
-+ echo "let date = \""$(BUILD_DATE)"\"" >> $@
-
- # gtk2 graph editor
- ###################
---
-2.11.0
-
diff --git a/gnu/packages/patches/openldap-CVE-2017-9287.patch b/gnu/packages/patches/openldap-CVE-2017-9287.patch
deleted file mode 100644
index 5ca2a60c60..0000000000
--- a/gnu/packages/patches/openldap-CVE-2017-9287.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Fix CVE-2017-9287:
-
-https://www.openldap.org/its/?findid=8655
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9287
-
-Patch copied from upstream source repository:
-
-https://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=commit;h=0cee1ffb6021b1aae3fcc9581699da1c85a6dd6e
-
-From 0cee1ffb6021b1aae3fcc9581699da1c85a6dd6e Mon Sep 17 00:00:00 2001
-From: Ryan Tandy <ryan@nardis.ca>
-Date: Wed, 17 May 2017 20:07:39 -0700
-Subject: [PATCH] ITS#8655 fix double free on paged search with pagesize 0
-
-Fixes a double free when a search includes the Paged Results control
-with a page size of 0 and the search base matches the filter.
----
- servers/slapd/back-mdb/search.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/servers/slapd/back-mdb/search.c b/servers/slapd/back-mdb/search.c
-index 301d1a498c..43442aa242 100644
---- a/servers/slapd/back-mdb/search.c
-+++ b/servers/slapd/back-mdb/search.c
-@@ -1066,7 +1066,8 @@ notfound:
- /* check size limit */
- if ( get_pagedresults(op) > SLAP_CONTROL_IGNORED ) {
- if ( rs->sr_nentries >= ((PagedResultsState *)op->o_pagedresults_state)->ps_size ) {
-- mdb_entry_return( op, e );
-+ if (e != base)
-+ mdb_entry_return( op, e );
- e = NULL;
- send_paged_response( op, rs, &lastid, tentries );
- goto done;
---
-2.13.0
-
diff --git a/gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch b/gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch
deleted file mode 100644
index 53f8fde9de..0000000000
--- a/gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Drop SPARQLWrapper from the required install inputs under Python 2, as it
-creates a circular dependency.
-
-diff -u rdflib-4.1.2.alt/setup.py rdflib-4.1.2/setup.py
---- rdflib-4.1.2.alt/setup.py 2014-03-04 12:40:26.000000000 +0100
-+++ rdflib-4.1.2/setup.py 2015-01-23 21:52:59.000000000 +0100
-@@ -52,7 +52,7 @@
- kwargs['test_suite'] = "nose.collector"
- kwargs['install_requires'] = [
- 'isodate',
-- 'pyparsing', 'SPARQLWrapper']
-+ 'pyparsing']
-
- if sys.version_info[1]<7: # Python 2.6
- kwargs['install_requires'].append('ordereddict')
-
diff --git a/gnu/packages/patches/readline-7.0-mingw.patch b/gnu/packages/patches/readline-7.0-mingw.patch
deleted file mode 100644
index 1dc491d556..0000000000
--- a/gnu/packages/patches/readline-7.0-mingw.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Configure checks for chown; add missing shields in code.
-
-Upstream status: not yet presented upstream.
-
---- readline-7.0/histfile.c.orig 2016-12-06 20:04:10.058901731 +0100
-+++ readline-7.0/histfile.c 2016-12-06 20:05:09.220083801 +0100
-@@ -610,8 +610,10 @@
- user is running this, it's a no-op. If the shell is running after sudo
- with a shared history file, we don't want to leave the history file
- owned by root. */
-+#if HAVE_CHOWN
- if (rv == 0 && exists)
- r = chown (filename, finfo.st_uid, finfo.st_gid);
-+#endif
-
- xfree (filename);
- FREE (tempname);
-@@ -757,8 +759,10 @@
- user is running this, it's a no-op. If the shell is running after sudo
- with a shared history file, we don't want to leave the history file
- owned by root. */
-+#if HAVE_CHOWN
- if (rv == 0 && exists)
- mode = chown (histname, finfo.st_uid, finfo.st_gid);
-+#endif
-
- FREE (histname);
- FREE (tempname);
diff --git a/gnu/packages/patches/superlu-dist-fix-mpi-deprecations.patch b/gnu/packages/patches/superlu-dist-fix-mpi-deprecations.patch
new file mode 100644
index 0000000000..25f0aaf2f3
--- /dev/null
+++ b/gnu/packages/patches/superlu-dist-fix-mpi-deprecations.patch
@@ -0,0 +1,57 @@
+From c9cbcf8730221e366c7495073f8f8d819ee8ce89 Mon Sep 17 00:00:00 2001
+From: Eric Bavier <bavier@member.fsf.org>
+Date: Wed, 6 Feb 2019 10:06:59 -0600
+Subject: [PATCH] Replace deprecated MPI_Attr_get.
+
+Fixes build with OpenMPI version 4.0.
+
+* SRC/pdgstrf.c, SRC/pdgstrf.c, SRC/superlu_grid.c: 'MPI_Attr_get' ->
+ 'MPI_Comm_get_attr'.
+---
+ SRC/pdgstrf.c | 2 +-
+ SRC/pzgstrf.c | 2 +-
+ SRC/superlu_grid.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/SRC/pdgstrf.c b/SRC/pdgstrf.c
+index 736ffa2..f92a1ba 100644
+--- a/SRC/pdgstrf.c
++++ b/SRC/pdgstrf.c
+@@ -426,7 +426,7 @@ pdgstrf(superlu_dist_options_t * options, int m, int n, double anorm,
+ s_eps = smach_dist("Epsilon");
+ thresh = s_eps * anorm;
+
+- MPI_Attr_get (MPI_COMM_WORLD, MPI_TAG_UB, &attr_val, &flag);
++ MPI_Comm_get_attr (MPI_COMM_WORLD, MPI_TAG_UB, &attr_val, &flag);
+ if (!flag) {
+ fprintf (stderr, "Could not get TAG_UB\n");
+ return (-1);
+diff --git a/SRC/pzgstrf.c b/SRC/pzgstrf.c
+index 8896548..8800057 100644
+--- a/SRC/pzgstrf.c
++++ b/SRC/pzgstrf.c
+@@ -426,7 +426,7 @@ pzgstrf(superlu_dist_options_t * options, int m, int n, double anorm,
+ s_eps = smach_dist("Epsilon");
+ thresh = s_eps * anorm;
+
+- MPI_Attr_get (MPI_COMM_WORLD, MPI_TAG_UB, &attr_val, &flag);
++ MPI_Comm_get_attr (MPI_COMM_WORLD, MPI_TAG_UB, &attr_val, &flag);
+ if (!flag) {
+ fprintf (stderr, "Could not get TAG_UB\n");
+ return (-1);
+diff --git a/SRC/superlu_grid.c b/SRC/superlu_grid.c
+index 1213d27..0c0fb90 100644
+--- a/SRC/superlu_grid.c
++++ b/SRC/superlu_grid.c
+@@ -150,7 +150,7 @@ void superlu_gridmap(
+ {
+ int tag_ub;
+ if ( !grid->iam ) {
+- MPI_Attr_get(Bcomm, MPI_TAG_UB, &tag_ub, &info);
++ MPI_Comm_get_attr(Bcomm, MPI_TAG_UB, &tag_ub, &info);
+ printf("MPI_TAG_UB %d\n", tag_ub);
+ /* returns 4295677672
+ In reality it is restricted to no greater than 16384. */
+--
+2.20.1
+
diff --git a/gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch b/gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch
deleted file mode 100644
index 9d0a08c8bf..0000000000
--- a/gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch
+++ /dev/null
@@ -1,1485 +0,0 @@
-From 1b39a1834ed182bbd8036a5cd74a9ea111fa4691 Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara@arm.com>
-Date: Mon, 29 Oct 2018 00:56:47 +0000
-Subject: [PATCH 03/13] sunxi: A64: Update .dts/.dtsi files
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Update the .dts/.dtsi file from the Linux sunxi/dt64-for-4.20 tree:
-commit 679294497be31596e1c9c61507746d72b6b05f26
-Author: Rodrigo Exterckötter Tjäder <rodrigo@tjader.xyz>
-Date: Wed Sep 26 19:48:24 2018 +0000
- arm64: dts: allwinner: a64: a64-olinuxino: set the PHY TX delay
-
-Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
-Reviewed-by: Jagan Teki <jagan@openedev.com>
----
- arch/arm/dts/sun50i-a64-amarula-relic.dts | 168 +++++++++++++-
- arch/arm/dts/sun50i-a64-bananapi-m64.dts | 34 ++-
- arch/arm/dts/sun50i-a64-nanopi-a64.dts | 89 +++++++-
- arch/arm/dts/sun50i-a64-olinuxino.dts | 103 ++++++++-
- arch/arm/dts/sun50i-a64-orangepi-win.dts | 179 ++++++++++++++-
- arch/arm/dts/sun50i-a64-pine64.dts | 32 ++-
- arch/arm/dts/sun50i-a64-sopine-baseboard.dts | 32 ++-
- arch/arm/dts/sun50i-a64-sopine.dtsi | 15 ++
- arch/arm/dts/sun50i-a64.dtsi | 313 +++++++++++++++++++++++++--
- 9 files changed, 920 insertions(+), 45 deletions(-)
-
-diff --git a/arch/arm/dts/sun50i-a64-amarula-relic.dts b/arch/arm/dts/sun50i-a64-amarula-relic.dts
-index f3b4e93ece..6cb2b7f0c8 100644
---- a/arch/arm/dts/sun50i-a64-amarula-relic.dts
-+++ b/arch/arm/dts/sun50i-a64-amarula-relic.dts
-@@ -22,11 +22,11 @@
- stdout-path = "serial0:115200n8";
- };
-
-- reg_vcc3v3: vcc3v3 {
-- compatible = "regulator-fixed";
-- regulator-name = "vcc3v3";
-- regulator-min-microvolt = <3300000>;
-- regulator-max-microvolt = <3300000>;
-+ wifi_pwrseq: wifi-pwrseq {
-+ compatible = "mmc-pwrseq-simple";
-+ clocks = <&rtc 1>;
-+ clock-names = "ext_clock";
-+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */
- };
- };
-
-@@ -34,10 +34,34 @@
- status = "okay";
- };
-
-+&mmc1 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&mmc1_pins>;
-+ vmmc-supply = <&reg_dcdc1>;
-+ /*
-+ * Schematic shows both dldo4 and eldo1 connected for vcc-io-wifi, but
-+ * dldo4 connection shows DNP(Do Not Populate) and eldo1 connected with
-+ * 0Ohm register to vcc-io-wifi so eldo1 is used.
-+ */
-+ vqmmc-supply = <&reg_eldo1>;
-+ mmc-pwrseq = <&wifi_pwrseq>;
-+ bus-width = <4>;
-+ non-removable;
-+ status = "okay";
-+
-+ brcmf: wifi@1 {
-+ reg = <1>;
-+ compatible = "brcm,bcm4329-fmac";
-+ interrupt-parent = <&r_pio>;
-+ interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* WL-WAKE-AP: PL3 */
-+ interrupt-names = "host-wake";
-+ };
-+};
-+
- &mmc2 {
- pinctrl-names = "default";
- pinctrl-0 = <&mmc2_pins>;
-- vmmc-supply = <&reg_vcc3v3>;
-+ vmmc-supply = <&reg_dcdc1>;
- bus-width = <8>;
- non-removable;
- cap-mmc-hw-reset;
-@@ -48,9 +72,138 @@
- status = "okay";
- };
-
-+&r_rsb {
-+ status = "okay";
-+
-+ axp803: pmic@3a3 {
-+ compatible = "x-powers,axp803";
-+ reg = <0x3a3>;
-+ interrupt-parent = <&r_intc>;
-+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+ x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
-+ };
-+};
-+
-+#include "axp803.dtsi"
-+
-+&reg_aldo1 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <2800000>;
-+ regulator-max-microvolt = <2800000>;
-+ regulator-name = "avdd-csi";
-+};
-+
-+&reg_aldo2 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <1800000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-name = "vcc-pl";
-+};
-+
-+&reg_aldo3 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <3000000>;
-+ regulator-max-microvolt = <3000000>;
-+ regulator-name = "vcc-pll-avcc";
-+};
-+
-+&reg_dcdc1 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-name = "vcc-3v3";
-+};
-+
-+&reg_dcdc2 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <1040000>;
-+ regulator-max-microvolt = <1300000>;
-+ regulator-name = "vdd-cpux";
-+};
-+
-+/* DCDC3 is polyphased with DCDC2 */
-+
-+&reg_dcdc5 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <1500000>;
-+ regulator-max-microvolt = <1500000>;
-+ regulator-name = "vcc-dram";
-+};
-+
-+&reg_dcdc6 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <1100000>;
-+ regulator-max-microvolt = <1100000>;
-+ regulator-name = "vdd-sys";
-+};
-+
-+&reg_dldo1 {
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-name = "vcc-hdmi-dsi-sensor";
-+};
-+
-+&reg_dldo2 {
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-name = "vcc-mipi";
-+};
-+
-+&reg_dldo3 {
-+ regulator-min-microvolt = <2800000>;
-+ regulator-max-microvolt = <2800000>;
-+ regulator-name = "dovdd-csi";
-+};
-+
-+&reg_dldo4 {
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-name = "vcc-wifi-io";
-+};
-+
-+&reg_drivevbus {
-+ regulator-name = "usb0-vbus";
-+ status = "okay";
-+};
-+
-+&reg_eldo1 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <1800000>;
-+ regulator-max-microvolt = <1800000>;
-+ regulator-name = "cpvdd";
-+};
-+
-+&reg_eldo3 {
-+ regulator-min-microvolt = <1800000>;
-+ regulator-max-microvolt = <1800000>;
-+ regulator-name = "dvdd-csi";
-+};
-+
-+&reg_fldo1 {
-+ regulator-min-microvolt = <1200000>;
-+ regulator-max-microvolt = <1200000>;
-+ regulator-name = "vcc-1v2-hsic";
-+};
-+
-+/*
-+ * The A64 chip cannot work without this regulator off, although
-+ * it seems to be only driving the AR100 core.
-+ * Maybe we don't still know well about CPUs domain.
-+ */
-+&reg_fldo2 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <1100000>;
-+ regulator-max-microvolt = <1100000>;
-+ regulator-name = "vdd-cpus";
-+};
-+
-+&reg_rtc_ldo {
-+ regulator-name = "vcc-rtc";
-+};
-+
- &uart0 {
- pinctrl-names = "default";
-- pinctrl-0 = <&uart0_pins_a>;
-+ pinctrl-0 = <&uart0_pb_pins>;
- status = "okay";
- };
-
-@@ -61,5 +214,6 @@
-
- &usbphy {
- usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
-+ usb0_vbus-supply = <&reg_drivevbus>;
- status = "okay";
- };
-diff --git a/arch/arm/dts/sun50i-a64-bananapi-m64.dts b/arch/arm/dts/sun50i-a64-bananapi-m64.dts
-index 0716b14411..ef1c90401b 100644
---- a/arch/arm/dts/sun50i-a64-bananapi-m64.dts
-+++ b/arch/arm/dts/sun50i-a64-bananapi-m64.dts
-@@ -60,6 +60,17 @@
- stdout-path = "serial0:115200n8";
- };
-
-+ hdmi-connector {
-+ compatible = "hdmi-connector";
-+ type = "a";
-+
-+ port {
-+ hdmi_con_in: endpoint {
-+ remote-endpoint = <&hdmi_out_con>;
-+ };
-+ };
-+ };
-+
- leds {
- compatible = "gpio-leds";
-
-@@ -86,6 +97,10 @@
- };
- };
-
-+&de {
-+ status = "okay";
-+};
-+
- &ehci0 {
- status = "okay";
- };
-@@ -103,6 +118,17 @@
- status = "okay";
- };
-
-+&hdmi {
-+ hvcc-supply = <&reg_dldo1>;
-+ status = "okay";
-+};
-+
-+&hdmi_out {
-+ hdmi_out_con: endpoint {
-+ remote-endpoint = <&hdmi_con_in>;
-+ };
-+};
-+
- &i2c1 {
- pinctrl-names = "default";
- pinctrl-0 = <&i2c1_pins>;
-@@ -151,7 +177,7 @@
-
- &mmc2 {
- pinctrl-names = "default";
-- pinctrl-0 = <&mmc2_pins>;
-+ pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
- vmmc-supply = <&reg_dcdc1>;
- bus-width = <8>;
- non-removable;
-@@ -296,9 +322,13 @@
- regulator-name = "vcc-rtc";
- };
-
-+&simplefb_hdmi {
-+ vcc-hdmi-supply = <&reg_dldo1>;
-+};
-+
- &uart0 {
- pinctrl-names = "default";
-- pinctrl-0 = <&uart0_pins_a>;
-+ pinctrl-0 = <&uart0_pb_pins>;
- status = "okay";
- };
-
-diff --git a/arch/arm/dts/sun50i-a64-nanopi-a64.dts b/arch/arm/dts/sun50i-a64-nanopi-a64.dts
-index e2dce48fa2..31884dbc88 100644
---- a/arch/arm/dts/sun50i-a64-nanopi-a64.dts
-+++ b/arch/arm/dts/sun50i-a64-nanopi-a64.dts
-@@ -51,12 +51,44 @@
- compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64";
-
- aliases {
-+ ethernet0 = &emac;
- serial0 = &uart0;
- };
-
- chosen {
- stdout-path = "serial0:115200n8";
- };
-+
-+ hdmi-connector {
-+ compatible = "hdmi-connector";
-+ type = "a";
-+
-+ port {
-+ hdmi_con_in: endpoint {
-+ remote-endpoint = <&hdmi_out_con>;
-+ };
-+ };
-+ };
-+
-+ leds {
-+ compatible = "gpio-leds";
-+
-+ blue {
-+ label = "nanopi-a64:blue:status";
-+ gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
-+ };
-+ };
-+
-+ wifi_pwrseq: wifi_pwrseq {
-+ compatible = "mmc-pwrseq-simple";
-+ clocks = <&rtc 1>;
-+ clock-names = "ext_clock";
-+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
-+ };
-+};
-+
-+&de {
-+ status = "okay";
- };
-
- &ehci0 {
-@@ -67,6 +99,26 @@
- status = "okay";
- };
-
-+&emac {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&rgmii_pins>;
-+ phy-mode = "rgmii";
-+ phy-handle = <&ext_rgmii_phy>;
-+ phy-supply = <&reg_dcdc1>;
-+ status = "okay";
-+};
-+
-+&hdmi {
-+ hvcc-supply = <&reg_dldo1>;
-+ status = "okay";
-+};
-+
-+&hdmi_out {
-+ hdmi_out_con: endpoint {
-+ remote-endpoint = <&hdmi_con_in>;
-+ };
-+};
-+
- /* i2c1 connected with gpio headers like pine64, bananapi */
- &i2c1 {
- pinctrl-names = "default";
-@@ -78,6 +130,13 @@
- bias-pull-up;
- };
-
-+&mdio {
-+ ext_rgmii_phy: ethernet-phy@1 {
-+ compatible = "ethernet-phy-ieee802.3-c22";
-+ reg = <7>;
-+ };
-+};
-+
- &mmc0 {
- pinctrl-names = "default";
- pinctrl-0 = <&mmc0_pins>;
-@@ -88,6 +147,24 @@
- status = "okay";
- };
-
-+&mmc1 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&mmc1_pins>;
-+ vmmc-supply = <&reg_dcdc1>;
-+ vqmmc-supply = <&reg_dldo4>;
-+ mmc-pwrseq = <&wifi_pwrseq>;
-+ bus-width = <4>;
-+ non-removable;
-+ status = "okay";
-+
-+ rtl8189etv: wifi@1 {
-+ reg = <1>;
-+ interrupt-parent = <&r_pio>;
-+ interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
-+ interrupt-names = "host-wake";
-+ };
-+};
-+
- &ohci0 {
- status = "okay";
- };
-@@ -125,9 +202,9 @@
-
- &reg_dcdc1 {
- regulator-always-on;
-- regulator-min-microvolt = <3000000>;
-- regulator-max-microvolt = <3000000>;
-- regulator-name = "vcc-3v";
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-name = "vcc-3v3";
- };
-
- &reg_dcdc2 {
-@@ -195,9 +272,13 @@
- regulator-name = "vcc-rtc";
- };
-
-+&simplefb_hdmi {
-+ vcc-hdmi-supply = <&reg_dldo1>;
-+};
-+
- &uart0 {
- pinctrl-names = "default";
-- pinctrl-0 = <&uart0_pins_a>;
-+ pinctrl-0 = <&uart0_pb_pins>;
- status = "okay";
- };
-
-diff --git a/arch/arm/dts/sun50i-a64-olinuxino.dts b/arch/arm/dts/sun50i-a64-olinuxino.dts
-index 3b3081b10e..f7a4bccaa5 100644
---- a/arch/arm/dts/sun50i-a64-olinuxino.dts
-+++ b/arch/arm/dts/sun50i-a64-olinuxino.dts
-@@ -51,6 +51,7 @@
- compatible = "olimex,a64-olinuxino", "allwinner,sun50i-a64";
-
- aliases {
-+ ethernet0 = &emac;
- serial0 = &uart0;
- };
-
-@@ -58,12 +59,74 @@
- stdout-path = "serial0:115200n8";
- };
-
-+ hdmi-connector {
-+ compatible = "hdmi-connector";
-+ type = "a";
-+
-+ port {
-+ hdmi_con_in: endpoint {
-+ remote-endpoint = <&hdmi_out_con>;
-+ };
-+ };
-+ };
-+
-+ reg_usb1_vbus: usb1-vbus {
-+ compatible = "regulator-fixed";
-+ regulator-name = "usb1-vbus";
-+ regulator-min-microvolt = <5000000>;
-+ regulator-max-microvolt = <5000000>;
-+ regulator-boot-on;
-+ enable-active-high;
-+ gpio = <&pio 6 9 GPIO_ACTIVE_HIGH>; /* PG9 */
-+ status = "okay";
-+ };
-+
- wifi_pwrseq: wifi_pwrseq {
- compatible = "mmc-pwrseq-simple";
- reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
- };
- };
-
-+&de {
-+ status = "okay";
-+};
-+
-+&ehci0 {
-+ status = "okay";
-+};
-+
-+&ehci1 {
-+ status = "okay";
-+};
-+
-+&emac {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&rgmii_pins>;
-+ phy-mode = "rgmii";
-+ phy-handle = <&ext_rgmii_phy>;
-+ phy-supply = <&reg_dcdc1>;
-+ allwinner,tx-delay-ps = <600>;
-+ status = "okay";
-+};
-+
-+&hdmi {
-+ hvcc-supply = <&reg_dldo1>;
-+ status = "okay";
-+};
-+
-+&hdmi_out {
-+ hdmi_out_con: endpoint {
-+ remote-endpoint = <&hdmi_con_in>;
-+ };
-+};
-+
-+&mdio {
-+ ext_rgmii_phy: ethernet-phy@1 {
-+ compatible = "ethernet-phy-ieee802.3-c22";
-+ reg = <1>;
-+ };
-+};
-+
- &mmc0 {
- pinctrl-names = "default";
- pinctrl-0 = <&mmc0_pins>;
-@@ -92,6 +155,14 @@
- };
- };
-
-+&ohci0 {
-+ status = "okay";
-+};
-+
-+&ohci1 {
-+ status = "okay";
-+};
-+
- &r_rsb {
- status = "okay";
-
-@@ -100,6 +171,7 @@
- reg = <0x3a3>;
- interrupt-parent = <&r_intc>;
- interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+ x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
- };
- };
-
-@@ -142,10 +214,14 @@
-
- /* DCDC3 is polyphased with DCDC2 */
-
-+/*
-+ * The board uses DDR3L DRAM chips. 1.36V is the closest to the nominal
-+ * 1.35V that the PMIC can drive.
-+ */
- &reg_dcdc5 {
- regulator-always-on;
-- regulator-min-microvolt = <1500000>;
-- regulator-max-microvolt = <1500000>;
-+ regulator-min-microvolt = <1360000>;
-+ regulator-max-microvolt = <1360000>;
- regulator-name = "vcc-ddr3";
- };
-
-@@ -180,6 +256,11 @@
- regulator-name = "vcc-wifi-io";
- };
-
-+&reg_drivevbus {
-+ regulator-name = "usb0-vbus";
-+ status = "okay";
-+};
-+
- &reg_eldo1 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
-@@ -214,8 +295,24 @@
- regulator-name = "vcc-rtc";
- };
-
-+&simplefb_hdmi {
-+ vcc-hdmi-supply = <&reg_dldo1>;
-+};
-+
- &uart0 {
- pinctrl-names = "default";
-- pinctrl-0 = <&uart0_pins_a>;
-+ pinctrl-0 = <&uart0_pb_pins>;
-+ status = "okay";
-+};
-+
-+&usb_otg {
-+ dr_mode = "otg";
-+ status = "okay";
-+};
-+
-+&usbphy {
- status = "okay";
-+ usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
-+ usb0_vbus-supply = <&reg_drivevbus>;
-+ usb1_vbus-supply = <&reg_usb1_vbus>;
- };
-diff --git a/arch/arm/dts/sun50i-a64-orangepi-win.dts b/arch/arm/dts/sun50i-a64-orangepi-win.dts
-index bf42690a33..b0c64f7579 100644
---- a/arch/arm/dts/sun50i-a64-orangepi-win.dts
-+++ b/arch/arm/dts/sun50i-a64-orangepi-win.dts
-@@ -1,5 +1,6 @@
- /*
- * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
-+ * Copyright (C) 2017-2018 Samuel Holland <samuel@sholland.org>
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
-@@ -51,23 +52,127 @@
- compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
-
- aliases {
-+ ethernet0 = &emac;
- serial0 = &uart0;
-+ serial1 = &uart1;
-+ serial2 = &uart2;
-+ serial3 = &uart3;
-+ serial4 = &uart4;
- };
-
- chosen {
- stdout-path = "serial0:115200n8";
- };
-+
-+ hdmi-connector {
-+ compatible = "hdmi-connector";
-+ type = "a";
-+
-+ port {
-+ hdmi_con_in: endpoint {
-+ remote-endpoint = <&hdmi_out_con>;
-+ };
-+ };
-+ };
-+
-+ leds {
-+ compatible = "gpio-leds";
-+
-+ status {
-+ label = "orangepi:green:status";
-+ gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
-+ };
-+ };
-+
-+ reg_gmac_3v3: gmac-3v3 {
-+ compatible = "regulator-fixed";
-+ regulator-name = "gmac-3v3";
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-boot-on;
-+ enable-active-high;
-+ gpio = <&pio 3 14 GPIO_ACTIVE_HIGH>; /* PD14 */
-+ status = "okay";
-+ };
-+
-+ reg_usb1_vbus: usb1-vbus {
-+ compatible = "regulator-fixed";
-+ regulator-name = "usb1-vbus";
-+ regulator-min-microvolt = <5000000>;
-+ regulator-max-microvolt = <5000000>;
-+ regulator-boot-on;
-+ enable-active-high;
-+ gpio = <&pio 3 7 GPIO_ACTIVE_HIGH>; /* PD7 */
-+ status = "okay";
-+ };
-+
-+ wifi_pwrseq: wifi_pwrseq {
-+ compatible = "mmc-pwrseq-simple";
-+ reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
-+ };
-+};
-+
-+&de {
-+ status = "okay";
-+};
-+
-+&ehci0 {
-+ status = "okay";
- };
-
- &ehci1 {
- status = "okay";
- };
-
-+&emac {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&rgmii_pins>;
-+ phy-mode = "rgmii";
-+ phy-handle = <&ext_rgmii_phy>;
-+ phy-supply = <&reg_gmac_3v3>;
-+ status = "okay";
-+};
-+
-+&hdmi {
-+ hvcc-supply = <&reg_dldo1>;
-+ status = "okay";
-+};
-+
-+&hdmi_out {
-+ hdmi_out_con: endpoint {
-+ remote-endpoint = <&hdmi_con_in>;
-+ };
-+};
-+
-+&mdio {
-+ ext_rgmii_phy: ethernet-phy@1 {
-+ compatible = "ethernet-phy-ieee802.3-c22";
-+ reg = <1>;
-+ };
-+};
-+
- &mmc0 {
- pinctrl-names = "default";
- pinctrl-0 = <&mmc0_pins>;
- vmmc-supply = <&reg_dcdc1>;
-- cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
-+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
-+ disable-wp;
-+ bus-width = <4>;
-+ status = "okay";
-+};
-+
-+&mmc1 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&mmc1_pins>;
-+ vmmc-supply = <&reg_dldo2>;
-+ vqmmc-supply = <&reg_dldo4>;
-+ mmc-pwrseq = <&wifi_pwrseq>;
-+ bus-width = <4>;
-+ non-removable;
-+ status = "okay";
-+};
-+
-+&ohci0 {
- status = "okay";
- };
-
-@@ -89,9 +194,8 @@
- #include "axp803.dtsi"
-
- &reg_aldo1 {
-- regulator-always-on;
-- regulator-min-microvolt = <1800000>;
-- regulator-max-microvolt = <3300000>;
-+ regulator-min-microvolt = <2800000>;
-+ regulator-max-microvolt = <2800000>;
- regulator-name = "afvcc-csi";
- };
-
-@@ -163,12 +267,23 @@
- regulator-name = "vcc-wifi-io";
- };
-
-+&reg_drivevbus {
-+ regulator-name = "usb0-vbus";
-+ status = "okay";
-+};
-+
- &reg_eldo1 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-name = "cpvdd";
- };
-
-+&reg_eldo3 {
-+ regulator-min-microvolt = <1500000>;
-+ regulator-max-microvolt = <1800000>;
-+ regulator-name = "dvdd-csi";
-+};
-+
- &reg_fldo1 {
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
-@@ -191,13 +306,65 @@
- regulator-name = "vcc-rtc";
- };
-
-+&simplefb_hdmi {
-+ vcc-hdmi-supply = <&reg_dldo1>;
-+};
-+
-+&spi0 {
-+ status = "okay";
-+
-+ spi-flash@0 {
-+ compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
-+ reg = <0>;
-+ spi-max-frequency = <80000000>;
-+ m25p,fast-read;
-+ status = "okay";
-+ };
-+};
-+
-+/* On debug connector */
- &uart0 {
- pinctrl-names = "default";
-- pinctrl-0 = <&uart0_pins_a>;
-+ pinctrl-0 = <&uart0_pb_pins>;
- status = "okay";
- };
-
--&usbphy {
-+/* Bluetooth */
-+&uart1 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
-+ status = "okay";
-+};
-+
-+/* On Pi-2 connector, RTS/CTS optional */
-+&uart2 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&uart2_pins>;
-+ status = "disabled";
-+};
-+
-+/* On Pi-2 connector, RTS/CTS optional */
-+&uart3 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&uart3_pins>;
-+ status = "disabled";
-+};
-+
-+/* On Pi-2 connector (labeled for SPI1), RTS/CTS optional */
-+&uart4 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&uart4_pins>;
-+ status = "disabled";
-+};
-+
-+&usb_otg {
-+ dr_mode = "otg";
- status = "okay";
- };
-
-+&usbphy {
-+ usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
-+ usb0_vbus-supply = <&reg_drivevbus>;
-+ usb1_vbus-supply = <&reg_usb1_vbus>;
-+ status = "okay";
-+};
-diff --git a/arch/arm/dts/sun50i-a64-pine64.dts b/arch/arm/dts/sun50i-a64-pine64.dts
-index a75825798a..c077b6c1f4 100644
---- a/arch/arm/dts/sun50i-a64-pine64.dts
-+++ b/arch/arm/dts/sun50i-a64-pine64.dts
-@@ -62,6 +62,21 @@
- chosen {
- stdout-path = "serial0:115200n8";
- };
-+
-+ hdmi-connector {
-+ compatible = "hdmi-connector";
-+ type = "a";
-+
-+ port {
-+ hdmi_con_in: endpoint {
-+ remote-endpoint = <&hdmi_out_con>;
-+ };
-+ };
-+ };
-+};
-+
-+&de {
-+ status = "okay";
- };
-
- &ehci0 {
-@@ -82,6 +97,17 @@
-
- };
-
-+&hdmi {
-+ hvcc-supply = <&reg_dldo1>;
-+ status = "okay";
-+};
-+
-+&hdmi_out {
-+ hdmi_out_con: endpoint {
-+ remote-endpoint = <&hdmi_con_in>;
-+ };
-+};
-+
- &i2c1 {
- pinctrl-names = "default";
- pinctrl-0 = <&i2c1_pins>;
-@@ -229,6 +255,10 @@
- regulator-name = "vcc-rtc";
- };
-
-+&simplefb_hdmi {
-+ vcc-hdmi-supply = <&reg_dldo1>;
-+};
-+
- /* On Euler connector */
- &spdif {
- status = "disabled";
-@@ -237,7 +267,7 @@
- /* On Exp and Euler connectors */
- &uart0 {
- pinctrl-names = "default";
-- pinctrl-0 = <&uart0_pins_a>;
-+ pinctrl-0 = <&uart0_pb_pins>;
- status = "okay";
- };
-
-diff --git a/arch/arm/dts/sun50i-a64-sopine-baseboard.dts b/arch/arm/dts/sun50i-a64-sopine-baseboard.dts
-index abe179de35..53fcc9098d 100644
---- a/arch/arm/dts/sun50i-a64-sopine-baseboard.dts
-+++ b/arch/arm/dts/sun50i-a64-sopine-baseboard.dts
-@@ -61,6 +61,17 @@
- stdout-path = "serial0:115200n8";
- };
-
-+ hdmi-connector {
-+ compatible = "hdmi-connector";
-+ type = "a";
-+
-+ port {
-+ hdmi_con_in: endpoint {
-+ remote-endpoint = <&hdmi_out_con>;
-+ };
-+ };
-+ };
-+
- reg_vcc1v8: vcc1v8 {
- compatible = "regulator-fixed";
- regulator-name = "vcc1v8";
-@@ -69,6 +80,10 @@
- };
- };
-
-+&de {
-+ status = "okay";
-+};
-+
- &ehci0 {
- status = "okay";
- };
-@@ -86,6 +101,17 @@
- status = "okay";
- };
-
-+&hdmi {
-+ hvcc-supply = <&reg_dldo1>;
-+ status = "okay";
-+};
-+
-+&hdmi_out {
-+ hdmi_out_con: endpoint {
-+ remote-endpoint = <&hdmi_con_in>;
-+ };
-+};
-+
- &mdio {
- ext_rgmii_phy: ethernet-phy@1 {
- compatible = "ethernet-phy-ieee802.3-c22";
-@@ -134,9 +160,13 @@
- regulator-name = "vcc-wifi";
- };
-
-+&simplefb_hdmi {
-+ vcc-hdmi-supply = <&reg_dldo1>;
-+};
-+
- &uart0 {
- pinctrl-names = "default";
-- pinctrl-0 = <&uart0_pins_a>;
-+ pinctrl-0 = <&uart0_pb_pins>;
- status = "okay";
- };
-
-diff --git a/arch/arm/dts/sun50i-a64-sopine.dtsi b/arch/arm/dts/sun50i-a64-sopine.dtsi
-index 43418bd881..6723b8695e 100644
---- a/arch/arm/dts/sun50i-a64-sopine.dtsi
-+++ b/arch/arm/dts/sun50i-a64-sopine.dtsi
-@@ -45,6 +45,8 @@
-
- #include "sun50i-a64.dtsi"
-
-+#include <dt-bindings/gpio/gpio.h>
-+
- &mmc0 {
- pinctrl-names = "default";
- pinctrl-0 = <&mmc0_pins>;
-@@ -52,6 +54,7 @@
- non-removable;
- disable-wp;
- bus-width = <4>;
-+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
- status = "okay";
- };
-
-@@ -66,6 +69,18 @@
- };
- };
-
-+&spi0 {
-+ status = "okay";
-+
-+ flash@0 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "jedec,spi-nor";
-+ reg = <0>;
-+ spi-max-frequency = <40000000>;
-+ };
-+};
-+
- #include "axp803.dtsi"
-
- &reg_aldo2 {
-diff --git a/arch/arm/dts/sun50i-a64.dtsi b/arch/arm/dts/sun50i-a64.dtsi
-index 7a083637c4..f3a66f8882 100644
---- a/arch/arm/dts/sun50i-a64.dtsi
-+++ b/arch/arm/dts/sun50i-a64.dtsi
-@@ -43,9 +43,12 @@
- */
-
- #include <dt-bindings/clock/sun50i-a64-ccu.h>
-+#include <dt-bindings/clock/sun8i-de2.h>
- #include <dt-bindings/clock/sun8i-r-ccu.h>
- #include <dt-bindings/interrupt-controller/arm-gic.h>
- #include <dt-bindings/reset/sun50i-a64-ccu.h>
-+#include <dt-bindings/reset/sun8i-de2.h>
-+#include <dt-bindings/reset/sun8i-r-ccu.h>
-
- / {
- interrupt-parent = <&gic>;
-@@ -57,17 +60,21 @@
- #size-cells = <1>;
- ranges;
-
--/*
-- * The pipeline mixer0-lcd0 depends on clock CLK_MIXER0 from DE2 CCU.
-- * However there is no support for this clock on A64 yet, so we depend
-- * on the upstream clocks here to keep them (and thus CLK_MIXER0) up.
-- */
- simplefb_lcd: framebuffer-lcd {
- compatible = "allwinner,simple-framebuffer",
- "simple-framebuffer";
- allwinner,pipeline = "mixer0-lcd0";
- clocks = <&ccu CLK_TCON0>,
-- <&ccu CLK_DE>, <&ccu CLK_BUS_DE>;
-+ <&display_clocks CLK_MIXER0>;
-+ status = "disabled";
-+ };
-+
-+ simplefb_hdmi: framebuffer-hdmi {
-+ compatible = "allwinner,simple-framebuffer",
-+ "simple-framebuffer";
-+ allwinner,pipeline = "mixer1-lcd1-hdmi";
-+ clocks = <&display_clocks CLK_MIXER1>,
-+ <&ccu CLK_TCON1>, <&ccu CLK_HDMI>;
- status = "disabled";
- };
- };
-@@ -81,6 +88,7 @@
- device_type = "cpu";
- reg = <0>;
- enable-method = "psci";
-+ next-level-cache = <&L2>;
- };
-
- cpu1: cpu@1 {
-@@ -88,6 +96,7 @@
- device_type = "cpu";
- reg = <1>;
- enable-method = "psci";
-+ next-level-cache = <&L2>;
- };
-
- cpu2: cpu@2 {
-@@ -95,6 +104,7 @@
- device_type = "cpu";
- reg = <2>;
- enable-method = "psci";
-+ next-level-cache = <&L2>;
- };
-
- cpu3: cpu@3 {
-@@ -102,7 +112,20 @@
- device_type = "cpu";
- reg = <3>;
- enable-method = "psci";
-+ next-level-cache = <&L2>;
- };
-+
-+ L2: l2-cache {
-+ compatible = "cache";
-+ cache-level = <2>;
-+ };
-+ };
-+
-+ de: display-engine {
-+ compatible = "allwinner,sun50i-a64-display-engine";
-+ allwinner,pipelines = <&mixer0>,
-+ <&mixer1>;
-+ status = "disabled";
- };
-
- osc24M: osc24M_clk {
-@@ -168,10 +191,92 @@
- #size-cells = <1>;
- ranges;
-
-+ de2@1000000 {
-+ compatible = "allwinner,sun50i-a64-de2";
-+ reg = <0x1000000 0x400000>;
-+ allwinner,sram = <&de2_sram 1>;
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ ranges = <0 0x1000000 0x400000>;
-+
-+ display_clocks: clock@0 {
-+ compatible = "allwinner,sun50i-a64-de2-clk";
-+ reg = <0x0 0x100000>;
-+ clocks = <&ccu CLK_DE>,
-+ <&ccu CLK_BUS_DE>;
-+ clock-names = "mod",
-+ "bus";
-+ resets = <&ccu RST_BUS_DE>;
-+ #clock-cells = <1>;
-+ #reset-cells = <1>;
-+ };
-+
-+ mixer0: mixer@100000 {
-+ compatible = "allwinner,sun50i-a64-de2-mixer-0";
-+ reg = <0x100000 0x100000>;
-+ clocks = <&display_clocks CLK_BUS_MIXER0>,
-+ <&display_clocks CLK_MIXER0>;
-+ clock-names = "bus",
-+ "mod";
-+ resets = <&display_clocks RST_MIXER0>;
-+
-+ ports {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ mixer0_out: port@1 {
-+ reg = <1>;
-+
-+ mixer0_out_tcon0: endpoint {
-+ remote-endpoint = <&tcon0_in_mixer0>;
-+ };
-+ };
-+ };
-+ };
-+
-+ mixer1: mixer@200000 {
-+ compatible = "allwinner,sun50i-a64-de2-mixer-1";
-+ reg = <0x200000 0x100000>;
-+ clocks = <&display_clocks CLK_BUS_MIXER1>,
-+ <&display_clocks CLK_MIXER1>;
-+ clock-names = "bus",
-+ "mod";
-+ resets = <&display_clocks RST_MIXER1>;
-+
-+ ports {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ mixer1_out: port@1 {
-+ reg = <1>;
-+
-+ mixer1_out_tcon1: endpoint {
-+ remote-endpoint = <&tcon1_in_mixer1>;
-+ };
-+ };
-+ };
-+ };
-+ };
-+
- syscon: syscon@1c00000 {
-- compatible = "allwinner,sun50i-a64-system-controller",
-- "syscon";
-+ compatible = "allwinner,sun50i-a64-system-control";
- reg = <0x01c00000 0x1000>;
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ ranges;
-+
-+ sram_c: sram@18000 {
-+ compatible = "mmio-sram";
-+ reg = <0x00018000 0x28000>;
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ ranges = <0 0x00018000 0x28000>;
-+
-+ de2_sram: sram-section@0 {
-+ compatible = "allwinner,sun50i-a64-sram-c";
-+ reg = <0x0000 0x28000>;
-+ };
-+ };
- };
-
- dma: dma-controller@1c02000 {
-@@ -185,6 +290,75 @@
- #dma-cells = <1>;
- };
-
-+ tcon0: lcd-controller@1c0c000 {
-+ compatible = "allwinner,sun50i-a64-tcon-lcd",
-+ "allwinner,sun8i-a83t-tcon-lcd";
-+ reg = <0x01c0c000 0x1000>;
-+ interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>;
-+ clock-names = "ahb", "tcon-ch0";
-+ clock-output-names = "tcon-pixel-clock";
-+ resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>;
-+ reset-names = "lcd", "lvds";
-+
-+ ports {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ tcon0_in: port@0 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ reg = <0>;
-+
-+ tcon0_in_mixer0: endpoint@0 {
-+ reg = <0>;
-+ remote-endpoint = <&mixer0_out_tcon0>;
-+ };
-+ };
-+
-+ tcon0_out: port@1 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ reg = <1>;
-+ };
-+ };
-+ };
-+
-+ tcon1: lcd-controller@1c0d000 {
-+ compatible = "allwinner,sun50i-a64-tcon-tv",
-+ "allwinner,sun8i-a83t-tcon-tv";
-+ reg = <0x01c0d000 0x1000>;
-+ interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&ccu CLK_BUS_TCON1>, <&ccu CLK_TCON1>;
-+ clock-names = "ahb", "tcon-ch1";
-+ resets = <&ccu RST_BUS_TCON1>;
-+ reset-names = "lcd";
-+
-+ ports {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ tcon1_in: port@0 {
-+ reg = <0>;
-+
-+ tcon1_in_mixer1: endpoint {
-+ remote-endpoint = <&mixer1_out_tcon1>;
-+ };
-+ };
-+
-+ tcon1_out: port@1 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ reg = <1>;
-+
-+ tcon1_out_hdmi: endpoint@1 {
-+ reg = <1>;
-+ remote-endpoint = <&hdmi_in_tcon1>;
-+ };
-+ };
-+ };
-+ };
-+
- mmc0: mmc@1c0f000 {
- compatible = "allwinner,sun50i-a64-mmc";
- reg = <0x01c0f000 0x1000>;
-@@ -227,6 +401,11 @@
- #size-cells = <0>;
- };
-
-+ sid: eeprom@1c14000 {
-+ compatible = "allwinner,sun50i-a64-sid";
-+ reg = <0x1c14000 0x400>;
-+ };
-+
- usb_otg: usb@1c19000 {
- compatible = "allwinner,sun8i-a33-musb";
- reg = <0x01c19000 0x0400>;
-@@ -356,7 +535,7 @@
- };
-
- mmc2_pins: mmc2-pins {
-- pins = "PC1", "PC5", "PC6", "PC8", "PC9",
-+ pins = "PC5", "PC6", "PC8", "PC9",
- "PC10","PC11", "PC12", "PC13",
- "PC14", "PC15", "PC16";
- function = "mmc2";
-@@ -364,6 +543,18 @@
- bias-pull-up;
- };
-
-+ mmc2_ds_pin: mmc2-ds-pin {
-+ pins = "PC1";
-+ function = "mmc2";
-+ drive-strength = <30>;
-+ bias-pull-up;
-+ };
-+
-+ pwm_pin: pwm_pin {
-+ pins = "PD22";
-+ function = "pwm";
-+ };
-+
- rmii_pins: rmii_pins {
- pins = "PD10", "PD11", "PD13", "PD14", "PD17",
- "PD18", "PD19", "PD20", "PD22", "PD23";
-@@ -394,7 +585,7 @@
- function = "spi1";
- };
-
-- uart0_pins_a: uart0 {
-+ uart0_pb_pins: uart0-pb-pins {
- pins = "PB8", "PB9";
- function = "uart0";
- };
-@@ -474,15 +665,6 @@
- status = "disabled";
- };
-
-- pwm: pwm@1c21400 {
-- compatible = "allwinner,sun50i-a64-pwm",
-- "allwinner,sun5i-a13-pwm";
-- reg = <0x01c21400 0x8>;
-- clocks = <&osc24M>;
-- #pwm-cells = <3>;
-- status = "disabled";
-- };
--
- uart0: serial@1c28000 {
- compatible = "snps,dw-apb-uart";
- reg = <0x01c28000 0x400>;
-@@ -617,8 +799,6 @@
- clocks = <&ccu CLK_BUS_EMAC>;
- clock-names = "stmmaceth";
- status = "disabled";
-- #address-cells = <1>;
-- #size-cells = <0>;
-
- mdio: mdio {
- compatible = "snps,dwmac-mdio";
-@@ -638,11 +818,69 @@
- #interrupt-cells = <3>;
- };
-
-+ pwm: pwm@1c21400 {
-+ compatible = "allwinner,sun50i-a64-pwm",
-+ "allwinner,sun5i-a13-pwm";
-+ reg = <0x01c21400 0x400>;
-+ clocks = <&osc24M>;
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&pwm_pin>;
-+ #pwm-cells = <3>;
-+ status = "disabled";
-+ };
-+
-+ hdmi: hdmi@1ee0000 {
-+ compatible = "allwinner,sun50i-a64-dw-hdmi",
-+ "allwinner,sun8i-a83t-dw-hdmi";
-+ reg = <0x01ee0000 0x10000>;
-+ reg-io-width = <1>;
-+ interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
-+ <&ccu CLK_HDMI>;
-+ clock-names = "iahb", "isfr", "tmds";
-+ resets = <&ccu RST_BUS_HDMI1>;
-+ reset-names = "ctrl";
-+ phys = <&hdmi_phy>;
-+ phy-names = "hdmi-phy";
-+ status = "disabled";
-+
-+ ports {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ hdmi_in: port@0 {
-+ reg = <0>;
-+
-+ hdmi_in_tcon1: endpoint {
-+ remote-endpoint = <&tcon1_out_hdmi>;
-+ };
-+ };
-+
-+ hdmi_out: port@1 {
-+ reg = <1>;
-+ };
-+ };
-+ };
-+
-+ hdmi_phy: hdmi-phy@1ef0000 {
-+ compatible = "allwinner,sun50i-a64-hdmi-phy";
-+ reg = <0x01ef0000 0x10000>;
-+ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
-+ <&ccu 7>;
-+ clock-names = "bus", "mod", "pll-0";
-+ resets = <&ccu RST_BUS_HDMI0>;
-+ reset-names = "phy";
-+ #phy-cells = <0>;
-+ };
-+
- rtc: rtc@1f00000 {
- compatible = "allwinner,sun6i-a31-rtc";
- reg = <0x01f00000 0x54>;
- interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
-+ clock-output-names = "rtc-osc32k", "rtc-osc32k-out";
-+ clocks = <&osc32k>;
-+ #clock-cells = <1>;
- };
-
- r_intc: interrupt-controller@1f00c00 {
-@@ -664,6 +902,29 @@
- #reset-cells = <1>;
- };
-
-+ r_i2c: i2c@1f02400 {
-+ compatible = "allwinner,sun50i-a64-i2c",
-+ "allwinner,sun6i-a31-i2c";
-+ reg = <0x01f02400 0x400>;
-+ interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&r_ccu CLK_APB0_I2C>;
-+ resets = <&r_ccu RST_APB0_I2C>;
-+ status = "disabled";
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ };
-+
-+ r_pwm: pwm@1f03800 {
-+ compatible = "allwinner,sun50i-a64-pwm",
-+ "allwinner,sun5i-a13-pwm";
-+ reg = <0x01f03800 0x400>;
-+ clocks = <&osc24M>;
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&r_pwm_pin>;
-+ #pwm-cells = <3>;
-+ status = "disabled";
-+ };
-+
- r_pio: pinctrl@1f02c00 {
- compatible = "allwinner,sun50i-a64-r-pinctrl";
- reg = <0x01f02c00 0x400>;
-@@ -675,6 +936,16 @@
- interrupt-controller;
- #interrupt-cells = <3>;
-
-+ r_i2c_pl89_pins: r-i2c-pl89-pins {
-+ pins = "PL8", "PL9";
-+ function = "s_i2c";
-+ };
-+
-+ r_pwm_pin: pwm {
-+ pins = "PL10";
-+ function = "s_pwm";
-+ };
-+
- r_rsb_pins: rsb {
- pins = "PL0", "PL1";
- function = "s_rsb";
---
-2.11.0
-
diff --git a/gnu/packages/patches/u-boot-pinebook-dts.patch b/gnu/packages/patches/u-boot-pinebook-dts.patch
deleted file mode 100644
index 48c004fdfc..0000000000
--- a/gnu/packages/patches/u-boot-pinebook-dts.patch
+++ /dev/null
@@ -1,388 +0,0 @@
-From b972831c3cd24f3c9bb0995ed61db8f8239f3391 Mon Sep 17 00:00:00 2001
-From: Vasily Khoruzhick <anarsoul@gmail.com>
-Date: Mon, 5 Nov 2018 20:24:31 -0800
-Subject: [PATCH 10/13] sunxi: DT: add support for Pinebook
-
-Pinebook is a laptop produced by Pine64, with USB-connected keyboard,
-USB-connected touchpad and an eDP LCD panel connected via a RGB-eDP
-bridge from Analogix.
-
-Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
-Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
-Tested-by: Maxime Ripard <maxime.ripard@bootlin.com>
-Cc: Vagrant Cascadian <vagrant@debian.org>
-Reviewed-by: Jagan Teki <jagan@openedev.com>
----
- arch/arm/dts/Makefile | 1 +
- arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi | 15 ++
- arch/arm/dts/sun50i-a64-pinebook.dts | 294 +++++++++++++++++++++++++++
- configs/pinebook_defconfig | 22 ++
- 4 files changed, 332 insertions(+)
- create mode 100644 arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi
- create mode 100644 arch/arm/dts/sun50i-a64-pinebook.dts
- create mode 100644 configs/pinebook_defconfig
-
-diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
-index 3093c1185e..eae6b9ee5d 100644
---- a/arch/arm/dts/Makefile
-+++ b/arch/arm/dts/Makefile
-@@ -406,6 +406,7 @@ dtb-$(CONFIG_MACH_SUN50I) += \
- sun50i-a64-orangepi-win.dtb \
- sun50i-a64-pine64-plus.dtb \
- sun50i-a64-pine64.dtb \
-+ sun50i-a64-pinebook.dtb \
- sun50i-a64-sopine-baseboard.dtb
- dtb-$(CONFIG_MACH_SUN9I) += \
- sun9i-a80-optimus.dtb \
-diff --git a/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi b/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi
-new file mode 100644
-index 0000000000..a99b7171d0
---- /dev/null
-+++ b/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi
-@@ -0,0 +1,15 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright (C) 2018 Vasily Khoruzhick <anarsoul@gmail.com>
-+ *
-+ */
-+
-+/* The ANX6345 eDP-bridge is on r_i2c */
-+&r_i2c {
-+ anx6345: edp-bridge@38 {
-+ compatible = "analogix,anx6345";
-+ reg = <0x38>;
-+ reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
-+ status = "okay";
-+ };
-+};
-diff --git a/arch/arm/dts/sun50i-a64-pinebook.dts b/arch/arm/dts/sun50i-a64-pinebook.dts
-new file mode 100644
-index 0000000000..ec537c5297
---- /dev/null
-+++ b/arch/arm/dts/sun50i-a64-pinebook.dts
-@@ -0,0 +1,294 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.xyz>
-+ * Copyright (C) 2018 Vasily Khoruzhick <anarsoul@gmail.com>
-+ *
-+ */
-+
-+/dts-v1/;
-+
-+#include "sun50i-a64.dtsi"
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
-+#include <dt-bindings/pwm/pwm.h>
-+
-+/ {
-+ model = "Pinebook";
-+ compatible = "pine64,pinebook", "allwinner,sun50i-a64";
-+
-+ aliases {
-+ serial0 = &uart0;
-+ ethernet0 = &rtl8723cs;
-+ };
-+
-+ vdd_bl: regulator@0 {
-+ compatible = "regulator-fixed";
-+ regulator-name = "bl-3v3";
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
-+ enable-active-high;
-+ };
-+
-+ backlight: backlight {
-+ compatible = "pwm-backlight";
-+ pwms = <&pwm 0 50000 0>;
-+ brightness-levels = <0 5 10 15 20 30 40 55 70 85 100>;
-+ default-brightness-level = <2>;
-+ enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
-+ power-supply = <&vdd_bl>;
-+ };
-+
-+ chosen {
-+ stdout-path = "serial0:115200n8";
-+
-+ framebuffer-lcd {
-+ panel-supply = <&reg_dc1sw>;
-+ dvdd25-supply = <&reg_dldo2>;
-+ dvdd12-supply = <&reg_fldo1>;
-+ };
-+ };
-+
-+ gpio_keys {
-+ compatible = "gpio-keys";
-+
-+ lid_switch {
-+ label = "Lid Switch";
-+ gpios = <&r_pio 0 12 GPIO_ACTIVE_LOW>; /* PL12 */
-+ linux,input-type = <EV_SW>;
-+ linux,code = <SW_LID>;
-+ linux,can-disable;
-+ wakeup-source;
-+ };
-+ };
-+
-+ reg_vcc3v3: vcc3v3 {
-+ compatible = "regulator-fixed";
-+ regulator-name = "vcc3v3";
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ };
-+
-+ wifi_pwrseq: wifi_pwrseq {
-+ compatible = "mmc-pwrseq-simple";
-+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
-+ };
-+};
-+
-+&ehci0 {
-+ phys = <&usbphy 0>;
-+ phy-names = "usb";
-+ status = "okay";
-+};
-+
-+&ehci1 {
-+ status = "okay";
-+};
-+
-+&mmc0 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&mmc0_pins>;
-+ vmmc-supply = <&reg_dcdc1>;
-+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
-+ disable-wp;
-+ bus-width = <4>;
-+ status = "okay";
-+};
-+
-+&mmc1 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&mmc1_pins>;
-+ vmmc-supply = <&reg_dldo4>;
-+ vqmmc-supply = <&reg_eldo1>;
-+ mmc-pwrseq = <&wifi_pwrseq>;
-+ bus-width = <4>;
-+ non-removable;
-+ status = "okay";
-+
-+ rtl8723cs: wifi@1 {
-+ reg = <1>;
-+ };
-+};
-+
-+&mmc2 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
-+ vmmc-supply = <&reg_dcdc1>;
-+ vqmmc-supply = <&reg_eldo1>;
-+ bus-width = <8>;
-+ non-removable;
-+ cap-mmc-hw-reset;
-+ mmc-hs200-1_8v;
-+ status = "okay";
-+};
-+
-+&ohci0 {
-+ phys = <&usbphy 0>;
-+ phy-names = "usb";
-+ status = "okay";
-+};
-+
-+&ohci1 {
-+ status = "okay";
-+};
-+
-+&pwm {
-+ status = "okay";
-+};
-+
-+&r_rsb {
-+ status = "okay";
-+
-+ axp803: pmic@3a3 {
-+ compatible = "x-powers,axp803";
-+ reg = <0x3a3>;
-+ interrupt-parent = <&r_intc>;
-+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+ };
-+};
-+
-+/* The ANX6345 eDP-bridge is on r_i2c */
-+&r_i2c {
-+ clock-frequency = <100000>;
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&r_i2c_pl89_pins>;
-+ status = "okay";
-+};
-+
-+#include "axp803.dtsi"
-+
-+&reg_aldo1 {
-+ regulator-min-microvolt = <2800000>;
-+ regulator-max-microvolt = <2800000>;
-+ regulator-name = "vcc-csi";
-+};
-+
-+&reg_aldo2 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <1800000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-name = "vcc-pl";
-+};
-+
-+&reg_aldo3 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <2700000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-name = "vcc-pll-avcc";
-+};
-+
-+&reg_dc1sw {
-+ regulator-name = "vcc-lcd";
-+};
-+
-+&reg_dcdc1 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-name = "vcc-3v3";
-+};
-+
-+&reg_dcdc2 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <1000000>;
-+ regulator-max-microvolt = <1300000>;
-+ regulator-name = "vdd-cpux";
-+};
-+
-+/* DCDC3 is polyphased with DCDC2 */
-+
-+&reg_dcdc5 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <1200000>;
-+ regulator-max-microvolt = <1200000>;
-+ regulator-name = "vcc-dram";
-+};
-+
-+&reg_dcdc6 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <1100000>;
-+ regulator-max-microvolt = <1100000>;
-+ regulator-name = "vdd-sys";
-+};
-+
-+&reg_dldo1 {
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-name = "vcc-hdmi";
-+};
-+
-+&reg_dldo2 {
-+ regulator-min-microvolt = <2500000>;
-+ regulator-max-microvolt = <2500000>;
-+ regulator-name = "vcc-edp";
-+};
-+
-+&reg_dldo3 {
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-name = "avdd-csi";
-+};
-+
-+&reg_dldo4 {
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-name = "vcc-wifi";
-+};
-+
-+&reg_eldo1 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <1800000>;
-+ regulator-max-microvolt = <1800000>;
-+ regulator-name = "cpvdd";
-+};
-+
-+&reg_eldo3 {
-+ regulator-min-microvolt = <1800000>;
-+ regulator-max-microvolt = <1800000>;
-+ regulator-name = "vdd-1v8-csi";
-+};
-+
-+&reg_fldo1 {
-+ regulator-min-microvolt = <1200000>;
-+ regulator-max-microvolt = <1200000>;
-+ regulator-name = "vcc-1v2-hsic";
-+};
-+
-+&reg_fldo2 {
-+ regulator-always-on;
-+ regulator-min-microvolt = <1100000>;
-+ regulator-max-microvolt = <1100000>;
-+ regulator-name = "vdd-cpus";
-+};
-+
-+&reg_ldo_io0 {
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-name = "vcc-usb";
-+ status = "okay";
-+};
-+
-+&reg_rtc_ldo {
-+ regulator-name = "vcc-rtc";
-+};
-+
-+&simplefb_hdmi {
-+ vcc-hdmi-supply = <&reg_dldo1>;
-+};
-+
-+&uart0 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&uart0_pb_pins>;
-+ status = "okay";
-+};
-+
-+&usb_otg {
-+ dr_mode = "host";
-+};
-+
-+&usbphy {
-+ usb0_vbus-supply = <&reg_ldo_io0>;
-+ usb1_vbus-supply = <&reg_ldo_io0>;
-+ status = "okay";
-+};
-diff --git a/configs/pinebook_defconfig b/configs/pinebook_defconfig
-new file mode 100644
-index 0000000000..5294dbd2eb
---- /dev/null
-+++ b/configs/pinebook_defconfig
-@@ -0,0 +1,22 @@
-+CONFIG_ARM=y
-+CONFIG_ARCH_SUNXI=y
-+CONFIG_SPL=y
-+CONFIG_MACH_SUN50I=y
-+CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y
-+CONFIG_DRAM_CLK=552
-+CONFIG_DRAM_ZQ=3881949
-+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
-+CONFIG_R_I2C_ENABLE=y
-+# CONFIG_CMD_FLASH is not set
-+# CONFIG_SPL_DOS_PARTITION is not set
-+# CONFIG_SPL_EFI_PARTITION is not set
-+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinebook"
-+CONFIG_DM_REGULATOR=y
-+CONFIG_DM_REGULATOR_FIXED=y
-+CONFIG_DM_PWM=y
-+CONFIG_PWM_SUNXI=y
-+CONFIG_USB_EHCI_HCD=y
-+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
-+# CONFIG_USB_GADGET is not set
-+CONFIG_VIDEO_BRIDGE=y
-+CONFIG_VIDEO_BRIDGE_ANALOGIX_ANX6345=y
---
-2.11.0
-
diff --git a/gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch b/gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch
deleted file mode 100644
index 118bdf8e0c..0000000000
--- a/gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 20940ef2a397446a209350900d3bd618c3fd5b94 Mon Sep 17 00:00:00 2001
-From: Vasily Khoruzhick <anarsoul@gmail.com>
-Date: Mon, 5 Nov 2018 20:24:28 -0800
-Subject: [PATCH 07/13] mmc: sunxi: add support for automatic delay calibration
-
-A64 and H6 support automatic delay calibration and Linux driver uses it
-instead of hardcoded delays. Add support for it to u-boot driver.
-
-Fixes eMMC instability on Pinebook
-
-Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
-Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
-Tested-by: Maxime Ripard <maxime.ripard@bootlin.com>
-Reviewed-by: Andre Przywara <andre.przywara@arm.com>
-Cc: Vagrant Cascadian <vagrant@debian.org>
-Reviewed-by: Jagan Teki <jagan@openedev.com>
----
- arch/arm/include/asm/arch-sunxi/mmc.h | 6 +++++-
- drivers/mmc/sunxi_mmc.c | 21 ++++++++++++++++++++-
- 2 files changed, 25 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/include/asm/arch-sunxi/mmc.h b/arch/arm/include/asm/arch-sunxi/mmc.h
-index d98c53faaa..f2deafddd2 100644
---- a/arch/arm/include/asm/arch-sunxi/mmc.h
-+++ b/arch/arm/include/asm/arch-sunxi/mmc.h
-@@ -46,7 +46,9 @@ struct sunxi_mmc {
- u32 cbda; /* 0x94 */
- u32 res2[26];
- #if defined(CONFIG_SUNXI_GEN_SUN6I) || defined(CONFIG_MACH_SUN50I_H6)
-- u32 res3[64];
-+ u32 res3[17];
-+ u32 samp_dl;
-+ u32 res4[46];
- #endif
- u32 fifo; /* 0x100 / 0x200 FIFO access address */
- };
-@@ -130,5 +132,7 @@ struct sunxi_mmc {
- #define SUNXI_MMC_COMMON_CLK_GATE (1 << 16)
- #define SUNXI_MMC_COMMON_RESET (1 << 18)
-
-+#define SUNXI_MMC_CAL_DL_SW_EN (0x1 << 7)
-+
- struct mmc *sunxi_mmc_init(int sdc_no);
- #endif /* _SUNXI_MMC_H */
-diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
-index 39f15eb423..147eb9b4d5 100644
---- a/drivers/mmc/sunxi_mmc.c
-+++ b/drivers/mmc/sunxi_mmc.c
-@@ -99,11 +99,16 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz)
- {
- unsigned int pll, pll_hz, div, n, oclk_dly, sclk_dly;
- bool new_mode = false;
-+ bool calibrate = false;
- u32 val = 0;
-
- if (IS_ENABLED(CONFIG_MMC_SUNXI_HAS_NEW_MODE) && (priv->mmc_no == 2))
- new_mode = true;
-
-+#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H6)
-+ calibrate = true;
-+#endif
-+
- /*
- * The MMC clock has an extra /2 post-divider when operating in the new
- * mode.
-@@ -174,7 +179,11 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz)
- val = CCM_MMC_CTRL_MODE_SEL_NEW;
- setbits_le32(&priv->reg->ntsr, SUNXI_MMC_NTSR_MODE_SEL_NEW);
- #endif
-- } else {
-+ } else if (!calibrate) {
-+ /*
-+ * Use hardcoded delay values if controller doesn't support
-+ * calibration
-+ */
- val = CCM_MMC_CTRL_OCLK_DLY(oclk_dly) |
- CCM_MMC_CTRL_SCLK_DLY(sclk_dly);
- }
-@@ -228,6 +237,16 @@ static int mmc_config_clock(struct sunxi_mmc_priv *priv, struct mmc *mmc)
- rval &= ~SUNXI_MMC_CLK_DIVIDER_MASK;
- writel(rval, &priv->reg->clkcr);
-
-+#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H6)
-+ /* A64 supports calibration of delays on MMC controller and we
-+ * have to set delay of zero before starting calibration.
-+ * Allwinner BSP driver sets a delay only in the case of
-+ * using HS400 which is not supported by mainline U-Boot or
-+ * Linux at the moment
-+ */
-+ writel(SUNXI_MMC_CAL_DL_SW_EN, &priv->reg->samp_dl);
-+#endif
-+
- /* Re-enable Clock */
- rval |= SUNXI_MMC_CLK_ENABLE;
- writel(rval, &priv->reg->clkcr);
---
-2.11.0
-
diff --git a/gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch b/gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch
deleted file mode 100644
index 824a16b9db..0000000000
--- a/gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 31a4ac4d79d75baeede3edfa95515fd4169ef502 Mon Sep 17 00:00:00 2001
-From: Vasily Khoruzhick <anarsoul@gmail.com>
-Date: Mon, 5 Nov 2018 20:24:30 -0800
-Subject: [PATCH 09/13] sun50i: A64: add support for R_I2C controller
-
-Allwinner A64 has a I2C controller, which is in the R_ MMIO zone and has
-two groups of pinmuxes on PL bank, so it's called R_I2C.
-
-Add support for this I2C controller and the pinmux which doesn't conflict
-with RSB.
-
-Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
-Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
-Tested-by: Maxime Ripard <maxime.ripard@bootlin.com>
-Cc: Vagrant Cascadian <vagrant@debian.org>
-Acked-by: Jagan Teki <jagan@openedev.com>
----
- arch/arm/include/asm/arch-sunxi/gpio.h | 1 +
- arch/arm/mach-sunxi/Kconfig | 1 +
- board/sunxi/board.c | 6 ++++++
- 3 files changed, 8 insertions(+)
-
-diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h
-index 6a5eafc3d3..2daf23f6f5 100644
---- a/arch/arm/include/asm/arch-sunxi/gpio.h
-+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
-@@ -211,6 +211,7 @@ enum sunxi_gpio_number {
- #define SUN8I_H3_GPL_R_TWI 2
- #define SUN8I_A23_GPL_R_TWI 3
- #define SUN8I_GPL_R_UART 2
-+#define SUN50I_GPL_R_TWI 2
-
- #define SUN9I_GPN_R_RSB 3
-
-diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
-index 6277abc3cc..560dc9b25d 100644
---- a/arch/arm/mach-sunxi/Kconfig
-+++ b/arch/arm/mach-sunxi/Kconfig
-@@ -278,6 +278,7 @@ config MACH_SUN50I
- select ARM64
- select DM_I2C
- select PHY_SUN4I_USB
-+ select SUN6I_PRCM
- select SUNXI_DE2
- select SUNXI_GEN_SUN6I
- select SUPPORT_SPL
-diff --git a/board/sunxi/board.c b/board/sunxi/board.c
-index b196d48674..64ccbc7245 100644
---- a/board/sunxi/board.c
-+++ b/board/sunxi/board.c
-@@ -168,10 +168,16 @@ void i2c_init_board(void)
- #endif
-
- #ifdef CONFIG_R_I2C_ENABLE
-+#ifdef CONFIG_MACH_SUN50I
-+ clock_twi_onoff(5, 1);
-+ sunxi_gpio_set_cfgpin(SUNXI_GPL(8), SUN50I_GPL_R_TWI);
-+ sunxi_gpio_set_cfgpin(SUNXI_GPL(9), SUN50I_GPL_R_TWI);
-+#else
- clock_twi_onoff(5, 1);
- sunxi_gpio_set_cfgpin(SUNXI_GPL(0), SUN8I_H3_GPL_R_TWI);
- sunxi_gpio_set_cfgpin(SUNXI_GPL(1), SUN8I_H3_GPL_R_TWI);
- #endif
-+#endif
- }
-
- #if defined(CONFIG_ENV_IS_IN_MMC) && defined(CONFIG_ENV_IS_IN_FAT)
---
-2.11.0
-
diff --git a/gnu/packages/patches/u-boot-pinebook-syscon-node.patch b/gnu/packages/patches/u-boot-pinebook-syscon-node.patch
deleted file mode 100644
index 9289645bec..0000000000
--- a/gnu/packages/patches/u-boot-pinebook-syscon-node.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From ababb5920e8992c9bb7956df3cc85dc68d27dfe8 Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara@arm.com>
-Date: Mon, 29 Oct 2018 00:56:48 +0000
-Subject: [PATCH 04/13] sunxi: A64: Re-add syscon to DT node
-
-The sun50i-a64.dtsi changes introduced in Linux v4.19-rc1 changed the
-compatible name for the syscon controller, dropping the generic "syscon"
-fallback. Using this new DT node will make the Ethernet driver in every
-older kernel (or non-Linux kernels) fail to initialise the MAC device.
-
-To allow booting distribution kernels (from installer images via UEFI,
-for instance), re-add the syscon compatible string as a fallback. This
-works with both older and newer kernels.
-
-Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
-Reviewed-by: Jagan Teki <jagan@openedev.com>
----
- arch/arm/dts/sun50i-a64.dtsi | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/dts/sun50i-a64.dtsi b/arch/arm/dts/sun50i-a64.dtsi
-index f3a66f8882..ff41abc96a 100644
---- a/arch/arm/dts/sun50i-a64.dtsi
-+++ b/arch/arm/dts/sun50i-a64.dtsi
-@@ -259,7 +259,8 @@
- };
-
- syscon: syscon@1c00000 {
-- compatible = "allwinner,sun50i-a64-system-control";
-+ compatible = "allwinner,sun50i-a64-system-control",
-+ "syscon";
- reg = <0x01c00000 0x1000>;
- #address-cells = <1>;
- #size-cells = <1>;
---
-2.11.0
-
diff --git a/gnu/packages/patches/u-boot-pinebook-video-bridge.patch b/gnu/packages/patches/u-boot-pinebook-video-bridge.patch
deleted file mode 100644
index 8c6ca8a992..0000000000
--- a/gnu/packages/patches/u-boot-pinebook-video-bridge.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 8336a43792a103c13d939b3925cb75322911f7fb Mon Sep 17 00:00:00 2001
-From: Vasily Khoruzhick <anarsoul@gmail.com>
-Date: Mon, 5 Nov 2018 20:24:29 -0800
-Subject: [PATCH 08/13] dm: video: bridge: don't fail to activate bridge if
- reset or sleep GPIO is missing
-
-Both GPIOs are optional, so we shouldn't fail if any is missing.
-Without this fix reset is not deasserted if sleep GPIO is missing.
-
-Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
-Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
-Tested-by: Maxime Ripard <maxime.ripard@bootlin.com>
-Reviewed-by: Andre Przywara <andre.przywara@arm.com>
-Cc: Vagrant Cascadian <vagrant@debian.org>
----
- drivers/video/bridge/video-bridge-uclass.c | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c
-index cd4959cc71..5fecb4cfd5 100644
---- a/drivers/video/bridge/video-bridge-uclass.c
-+++ b/drivers/video/bridge/video-bridge-uclass.c
-@@ -106,13 +106,19 @@ static int video_bridge_pre_probe(struct udevice *dev)
- int video_bridge_set_active(struct udevice *dev, bool active)
- {
- struct video_bridge_priv *uc_priv = dev_get_uclass_priv(dev);
-- int ret;
-+ int ret = 0;
-
- debug("%s: %d\n", __func__, active);
-- ret = dm_gpio_set_value(&uc_priv->sleep, !active);
-- if (ret)
-- return ret;
-- if (active) {
-+ if (uc_priv->sleep.dev) {
-+ ret = dm_gpio_set_value(&uc_priv->sleep, !active);
-+ if (ret)
-+ return ret;
-+ }
-+
-+ if (!active)
-+ return 0;
-+
-+ if (uc_priv->reset.dev) {
- ret = dm_gpio_set_value(&uc_priv->reset, true);
- if (ret)
- return ret;
---
-2.11.0
-
diff --git a/gnu/packages/patches/xboing-CVE-2004-0149.patch b/gnu/packages/patches/xboing-CVE-2004-0149.patch
deleted file mode 100644
index b40146b434..0000000000
--- a/gnu/packages/patches/xboing-CVE-2004-0149.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0149
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=174924
----
- demo.c | 2 +-
- editor.c | 12 ++++++------
- file.c | 2 +-
- highscore.c | 6 +++---
- misc.c | 2 +-
- preview.c | 2 +-
- 6 files changed, 13 insertions(+), 13 deletions(-)
-
-diff --git a/demo.c b/demo.c
-index 9084e70..f4fc2cd 100644
---- a/demo.c
-+++ b/demo.c
-@@ -154,7 +154,7 @@ static void DoBlocks(display, window)
-
- /* Construct the demo level filename */
- if ((str = getenv("XBOING_LEVELS_DIR")) != NULL)
-- sprintf(levelPath, "%s/demo.data", str);
-+ snprintf(levelPath, sizeof(levelPath),"%s/demo.data", str);
- else
- sprintf(levelPath, "%s/demo.data", LEVEL_INSTALL_DIR);
-
-diff --git a/editor.c b/editor.c
-index f2bb9ed..66d0679 100644
---- a/editor.c
-+++ b/editor.c
-@@ -213,7 +213,7 @@ static void DoLoadLevel(display, window)
-
- /* Construct the Edit level filename */
- if ((str = getenv("XBOING_LEVELS_DIR")) != NULL)
-- sprintf(levelPath, "%s/editor.data", str);
-+ snprintf(levelPath,sizeof(levelPath)-1, "%s/editor.data", str);
- else
- sprintf(levelPath, "%s/editor.data", LEVEL_INSTALL_DIR);
-
-@@ -958,8 +958,8 @@ static void LoadALevel(display)
- if ((num > 0) && (num <= MAX_NUM_LEVELS))
- {
- /* Construct the Edit level filename */
-- if ((str2 = getenv("XBOING_LEVELS_DIR")) != NULL)
-- sprintf(levelPath, "%s/level%02ld.data", str2, (u_long) num);
-+ if ((str2 = getenv("XBOING_LEVELS_DIR")) != NULL)
-+ snprintf(levelPath, sizeof(levelPath)-1,"%s/level%02ld.data", str2, (u_long) num);
- else
- sprintf(levelPath, "%s/level%02ld.data",
- LEVEL_INSTALL_DIR, (u_long) num);
-@@ -1017,9 +1017,9 @@ static void SaveALevel(display)
- num = atoi(str);
- if ((num > 0) && (num <= MAX_NUM_LEVELS))
- {
-- /* Construct the Edit level filename */
-- if ((str2 = getenv("XBOING_LEVELS_DIR")) != NULL)
-- sprintf(levelPath, "%s/level%02ld.data", str2, (u_long) num);
-+ /* Construct the Edit level filename */
-+ if ((str2 = getenv("XBOING_LEVELS_DIR")) != NULL)
-+ snprintf(levelPath, sizeof(levelPath)-1,"%s/level%02ld.data", str2, (u_long) num);
- else
- sprintf(levelPath, "%s/level%02ld.data",
- LEVEL_INSTALL_DIR, (u_long) num);
-diff --git a/file.c b/file.c
-index 4c043cd..99a0854 100644
---- a/file.c
-+++ b/file.c
-@@ -139,7 +139,7 @@ void SetupStage(display, window)
-
- /* Construct the level filename */
- if ((str = getenv("XBOING_LEVELS_DIR")) != NULL)
-- sprintf(levelPath, "%s/level%02ld.data", str, newLevel);
-+ snprintf(levelPath,sizeof(levelPath), "%s/level%02ld.data", str, newLevel);
- else
- sprintf(levelPath, "%s/level%02ld.data", LEVEL_INSTALL_DIR, newLevel);
-
-diff --git a/highscore.c b/highscore.c
-index f0db3e9..792273e 100644
---- a/highscore.c
-+++ b/highscore.c
-@@ -1023,7 +1023,7 @@ int ReadHighScoreTable(type)
- {
- /* Use the environment variable if it exists */
- if ((str = getenv("XBOING_SCORE_FILE")) != NULL)
-- strcpy(filename, str);
-+ strncpy(filename, str, sizeof(filename)-1);
- else
- strcpy(filename, HIGH_SCORE_FILE);
- }
-@@ -1095,7 +1095,7 @@ int WriteHighScoreTable(type)
- {
- /* Use the environment variable if it exists */
- if ((str = getenv("XBOING_SCORE_FILE")) != NULL)
-- strcpy(filename, str);
-+ strncpy(filename, str, sizeof(filename)-1);
- else
- strcpy(filename, HIGH_SCORE_FILE);
- }
-@@ -1218,7 +1218,7 @@ static int LockUnlock(cmd)
-
- /* Use the environment variable if it exists */
- if ((str = getenv("XBOING_SCORE_FILE")) != NULL)
-- strcpy(filename, str);
-+ strncpy(filename, str, sizeof(filename)-1);
- else
- strcpy(filename, HIGH_SCORE_FILE);
-
-diff --git a/misc.c b/misc.c
-index f3ab37e..7f3ddce 100644
---- a/misc.c
-+++ b/misc.c
-@@ -427,7 +427,7 @@ char *GetHomeDir()
- */
-
- if ((ptr = getenv("HOME")) != NULL)
-- (void) strcpy(dest, ptr);
-+ (void) strncpy(dest, ptr,sizeof(dest)-1);
- else
- {
- /* HOME variable is not present so get USER var */
-diff --git a/preview.c b/preview.c
-index 41c1187..687f566 100644
---- a/preview.c
-+++ b/preview.c
-@@ -139,7 +139,7 @@ static void DoLoadLevel(display, window)
-
- /* Construct the Preview level filename */
- if ((str = getenv("XBOING_LEVELS_DIR")) != NULL)
-- sprintf(levelPath, "%s/level%02d.data", str, lnum);
-+ snprintf(levelPath, sizeof(levelPath)-1, "%s/level%02d.data", str, lnum);
- else
- sprintf(levelPath, "%s/level%02d.data", LEVEL_INSTALL_DIR, lnum);
-
---
-2.15.1
-