mirror of
https://github.com/Fishwaldo/build.git
synced 2025-07-23 21:39:02 +00:00
Attach Odroid XU4 DEV branch back to mainline + patches
This commit is contained in:
parent
20d17a7c95
commit
f47e7836d1
27 changed files with 1556 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm 5.7.0-rc3 Kernel Configuration
|
||||
# Linux/arm 5.7.4 Kernel Configuration
|
||||
#
|
||||
|
||||
#
|
||||
|
@ -13,7 +13,6 @@ CONFIG_CLANG_VERSION=0
|
|||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
CONFIG_CC_HAS_ASM_INLINE=y
|
||||
CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_BUILDTIME_TABLE_SORT=y
|
||||
|
||||
|
@ -787,6 +786,7 @@ CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
|
|||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y
|
||||
CONFIG_FREEZER=y
|
||||
|
||||
#
|
||||
|
@ -2027,7 +2027,6 @@ CONFIG_NET_VENDOR_HISILICON=y
|
|||
# CONFIG_HIX5HD2_GMAC is not set
|
||||
# CONFIG_HISI_FEMAC is not set
|
||||
# CONFIG_HIP04_ETH is not set
|
||||
# CONFIG_HNS is not set
|
||||
# CONFIG_HNS_DSAF is not set
|
||||
# CONFIG_HNS_ENET is not set
|
||||
CONFIG_NET_VENDOR_HUAWEI=y
|
||||
|
@ -4928,7 +4927,7 @@ CONFIG_USB_RAW_GADGET=m
|
|||
# end of USB Gadget precomposed configurations
|
||||
|
||||
# CONFIG_TYPEC is not set
|
||||
# CONFIG_USB_ROLE_SWITCH is not set
|
||||
CONFIG_USB_ROLE_SWITCH=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_PWRSEQ_EMMC=y
|
||||
# CONFIG_PWRSEQ_SD8787 is not set
|
||||
|
|
|
@ -23,12 +23,13 @@ case $BRANCH in
|
|||
KERNELSOURCE='https://github.com/hardkernel/linux'
|
||||
KERNELBRANCH='branch:odroid-5.4.y'
|
||||
KERNELDIR='linux-odroidxu4'
|
||||
|
||||
;;
|
||||
|
||||
dev)
|
||||
KERNELSOURCE='https://github.com/chewitt/linux'
|
||||
KERNELBRANCH='branch:odroid-xu4'
|
||||
KERNELDIR='linux-odroidxu4'
|
||||
|
||||
KERNELBRANCH='branch:linux-5.7.y'
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
|
|
|
@ -475,6 +475,7 @@ odroidxu4 current bionic desktop stable yes
|
|||
odroidxu4 current buster minimal stable yes
|
||||
odroidxu4 current bullseye cli stable yes
|
||||
odroidxu4 current focal cli stable yes
|
||||
odroidxu4 dev focal cli stable no
|
||||
|
||||
# orangepi2
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
From a254e56473755fc56ec53136e9f217d4863e1cad Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Mon, 21 Oct 2019 10:58:47 +1030
|
||||
Subject: [PATCH 01/24] MEMEKA: ARM: dma-mapping: increase DMA coherent pool
|
||||
size to 2M
|
||||
|
||||
---
|
||||
arch/arm/mm/dma-mapping.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
|
||||
index 8a8949174b1c..80d4e66039ff 100644
|
||||
--- a/arch/arm/mm/dma-mapping.c
|
||||
+++ b/arch/arm/mm/dma-mapping.c
|
||||
@@ -314,7 +314,7 @@ static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp,
|
||||
pgprot_t prot, struct page **ret_page,
|
||||
const void *caller, bool want_vaddr);
|
||||
|
||||
-#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K
|
||||
+#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_2M
|
||||
static struct gen_pool *atomic_pool __ro_after_init;
|
||||
|
||||
static size_t atomic_pool_size __initdata = DEFAULT_DMA_COHERENT_POOL_SIZE;
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
From 7ed0bff994ecee9bd6306d23ac1dd5d9b98f91bd Mon Sep 17 00:00:00 2001
|
||||
From: OtherCrashOverride <OtherCrashOverride@users.noreply.github.com>
|
||||
Date: Sun, 9 Apr 2017 17:31:25 +0000
|
||||
Subject: [PATCH 02/24] MEMEKA: drm/exynos/mixer: never blend the base layer
|
||||
|
||||
On Exynos there is a solid color plane that is logically below all the other display planes.
|
||||
This causes display artifacts due to alpha. The patch disables blending the base plane with
|
||||
the solid color plane (no alpha).
|
||||
|
||||
Reviewed-by: memeka <mihailescu2m@gmail.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/gpu/drm/exynos/exynos_mixer.c | 33 +++++++++++++++------------
|
||||
1 file changed, 18 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
|
||||
index 21b726baedea..c1a527fa1df8 100644
|
||||
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
|
||||
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
|
||||
@@ -315,23 +315,26 @@ static void mixer_cfg_gfx_blend(struct mixer_context *ctx, unsigned int win,
|
||||
u32 val;
|
||||
|
||||
val = MXR_GRP_CFG_COLOR_KEY_DISABLE; /* no blank key */
|
||||
- switch (pixel_alpha) {
|
||||
- case DRM_MODE_BLEND_PIXEL_NONE:
|
||||
- break;
|
||||
- case DRM_MODE_BLEND_COVERAGE:
|
||||
- val |= MXR_GRP_CFG_PIXEL_BLEND_EN;
|
||||
- break;
|
||||
- case DRM_MODE_BLEND_PREMULTI:
|
||||
- default:
|
||||
- val |= MXR_GRP_CFG_BLEND_PRE_MUL;
|
||||
- val |= MXR_GRP_CFG_PIXEL_BLEND_EN;
|
||||
- break;
|
||||
- }
|
||||
+ if (win) {
|
||||
+ switch (pixel_alpha) {
|
||||
+ case DRM_MODE_BLEND_PIXEL_NONE:
|
||||
+ break;
|
||||
+ case DRM_MODE_BLEND_COVERAGE:
|
||||
+ val |= MXR_GRP_CFG_PIXEL_BLEND_EN;
|
||||
+ break;
|
||||
+ case DRM_MODE_BLEND_PREMULTI:
|
||||
+ default:
|
||||
+ val |= MXR_GRP_CFG_BLEND_PRE_MUL;
|
||||
+ val |= MXR_GRP_CFG_PIXEL_BLEND_EN;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
- if (alpha != DRM_BLEND_ALPHA_OPAQUE) {
|
||||
- val |= MXR_GRP_CFG_WIN_BLEND_EN;
|
||||
- val |= win_alpha;
|
||||
+ if (alpha != DRM_BLEND_ALPHA_OPAQUE) {
|
||||
+ val |= MXR_GRP_CFG_WIN_BLEND_EN;
|
||||
+ val |= win_alpha;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
mixer_reg_writemask(ctx, MXR_GRAPHIC_CFG(win),
|
||||
val, MXR_GRP_CFG_MISC_MASK);
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
From 3a03fe387971627668b9cafa3db168e3fe0a2206 Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Thu, 24 Jan 2019 16:07:24 +1030
|
||||
Subject: [PATCH 03/24] MEMEKA: media: s5p-jpeg: Enable decoding with multiple
|
||||
buffers
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/media/platform/s5p-jpeg/jpeg-core.c | 45 ++++++++++++++++-----
|
||||
1 file changed, 35 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
|
||||
index 86bda3947110..3015a9c350f2 100644
|
||||
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
|
||||
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
|
||||
@@ -1797,6 +1797,31 @@ static int exynos3250_jpeg_try_crop(struct s5p_jpeg_ctx *ctx,
|
||||
* V4L2 controls
|
||||
*/
|
||||
|
||||
+static int vidioc_decoder_cmd(struct file *file, void *priv,
|
||||
+ struct v4l2_decoder_cmd *cmd)
|
||||
+{
|
||||
+ struct s5p_jpeg_ctx *ctx = fh_to_ctx(priv);
|
||||
+ struct vb2_queue *vq_src = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT);
|
||||
+ struct vb2_v4l2_buffer *buf;
|
||||
+
|
||||
+ switch (cmd->cmd) {
|
||||
+ case V4L2_DEC_CMD_STOP:
|
||||
+ if (cmd->flags != 0)
|
||||
+ return -EINVAL;
|
||||
+ if (!vb2_is_streaming(vq_src))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ buf = v4l2_m2m_last_src_buf(ctx->fh.m2m_ctx);
|
||||
+ buf->flags |= V4L2_BUF_FLAG_LAST;
|
||||
+
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int s5p_jpeg_g_selection(struct file *file, void *priv,
|
||||
struct v4l2_selection *s)
|
||||
{
|
||||
@@ -1831,9 +1856,6 @@ static int s5p_jpeg_g_selection(struct file *file, void *priv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/*
|
||||
- * V4L2 controls
|
||||
- */
|
||||
static int s5p_jpeg_s_selection(struct file *file, void *fh,
|
||||
struct v4l2_selection *s)
|
||||
{
|
||||
@@ -2025,6 +2047,8 @@ static const struct v4l2_ioctl_ops s5p_jpeg_ioctl_ops = {
|
||||
.vidioc_streamon = v4l2_m2m_ioctl_streamon,
|
||||
.vidioc_streamoff = v4l2_m2m_ioctl_streamoff,
|
||||
|
||||
+ .vidioc_decoder_cmd = vidioc_decoder_cmd,
|
||||
+
|
||||
.vidioc_g_selection = s5p_jpeg_g_selection,
|
||||
.vidioc_s_selection = s5p_jpeg_s_selection,
|
||||
|
||||
@@ -2471,13 +2495,6 @@ static int s5p_jpeg_queue_setup(struct vb2_queue *vq,
|
||||
|
||||
size = q_data->size;
|
||||
|
||||
- /*
|
||||
- * header is parsed during decoding and parsed information stored
|
||||
- * in the context so we do not allow another buffer to overwrite it
|
||||
- */
|
||||
- if (ctx->mode == S5P_JPEG_DECODE)
|
||||
- count = 1;
|
||||
-
|
||||
*nbuffers = count;
|
||||
*nplanes = 1;
|
||||
sizes[0] = size;
|
||||
@@ -2588,6 +2605,7 @@ static int s5p_jpeg_start_streaming(struct vb2_queue *q, unsigned int count)
|
||||
static void s5p_jpeg_stop_streaming(struct vb2_queue *q)
|
||||
{
|
||||
struct s5p_jpeg_ctx *ctx = vb2_get_drv_priv(q);
|
||||
+ struct vb2_v4l2_buffer *buf;
|
||||
|
||||
/*
|
||||
* STREAMOFF is an acknowledgment for resolution change event.
|
||||
@@ -2600,6 +2618,11 @@ static void s5p_jpeg_stop_streaming(struct vb2_queue *q)
|
||||
ctx->state = JPEGCTX_RUNNING;
|
||||
}
|
||||
|
||||
+ while ((buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx)))
|
||||
+ v4l2_m2m_buf_done(buf, VB2_BUF_STATE_ERROR);
|
||||
+ while ((buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx)))
|
||||
+ v4l2_m2m_buf_done(buf, VB2_BUF_STATE_ERROR);
|
||||
+
|
||||
pm_runtime_put(ctx->jpeg->dev);
|
||||
}
|
||||
|
||||
@@ -2839,6 +2862,8 @@ static irqreturn_t exynos3250_jpeg_irq(int irq, void *dev_id)
|
||||
v4l2_m2m_buf_done(src_buf, state);
|
||||
if (curr_ctx->mode == S5P_JPEG_ENCODE)
|
||||
vb2_set_plane_payload(&dst_buf->vb2_buf, 0, payload_size);
|
||||
+ if (src_buf->flags & V4L2_BUF_FLAG_LAST)
|
||||
+ dst_buf->flags |= V4L2_BUF_FLAG_LAST;
|
||||
v4l2_m2m_buf_done(dst_buf, state);
|
||||
|
||||
curr_ctx->subsampling =
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
From e833028fc7a38ee2fac724a3bf267131926a62de Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Tue, 10 Jul 2018 11:24:56 +0930
|
||||
Subject: [PATCH 04/24] MEMEKA: media: exynos-gsc: fix v4l2 SELECTION api
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/media/platform/exynos-gsc/gsc-core.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.h b/drivers/media/platform/exynos-gsc/gsc-core.h
|
||||
index 8e5a9acb78aa..235d687614f0 100644
|
||||
--- a/drivers/media/platform/exynos-gsc/gsc-core.h
|
||||
+++ b/drivers/media/platform/exynos-gsc/gsc-core.h
|
||||
@@ -474,9 +474,9 @@ static inline struct gsc_frame *ctx_get_frame(struct gsc_ctx *ctx,
|
||||
{
|
||||
struct gsc_frame *frame;
|
||||
|
||||
- if (V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE == type) {
|
||||
+ if (V4L2_BUF_TYPE_VIDEO_OUTPUT == type || V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE == type) {
|
||||
frame = &ctx->s_frame;
|
||||
- } else if (V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE == type) {
|
||||
+ } else if (V4L2_BUF_TYPE_VIDEO_CAPTURE == type || V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE == type) {
|
||||
frame = &ctx->d_frame;
|
||||
} else {
|
||||
pr_err("Wrong buffer/video queue type (%d)", type);
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
From 0a554c41738980359eb40c11a754839e7e2686ff Mon Sep 17 00:00:00 2001
|
||||
From: Thierry Escande <thierry.escande@collabora.com>
|
||||
Date: Wed, 26 Oct 2016 10:52:05 +0200
|
||||
Subject: [PATCH 05/24] MEMEKA: videobuf2-dc: Move vb2_dc_get_base_sgt() above
|
||||
mmap callbacks
|
||||
|
||||
This patch moves vb2_dc_get_base_sgt() function above mmap buffers
|
||||
callbacks, particularly vb2_dc_alloc() and vb2_dc_mmap() from where it
|
||||
will be called for cacheable MMAP support introduced in the next patch.
|
||||
|
||||
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
.../common/videobuf2/videobuf2-dma-contig.c | 44 +++++++++----------
|
||||
1 file changed, 22 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
index d3a3ee5b597b..1150e83c9c8d 100644
|
||||
--- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
+++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
@@ -62,6 +62,28 @@ static unsigned long vb2_dc_get_contiguous_size(struct sg_table *sgt)
|
||||
return size;
|
||||
}
|
||||
|
||||
+static struct sg_table *vb2_dc_get_base_sgt(struct vb2_dc_buf *buf)
|
||||
+{
|
||||
+ int ret;
|
||||
+ struct sg_table *sgt;
|
||||
+
|
||||
+ sgt = kmalloc(sizeof(*sgt), GFP_KERNEL);
|
||||
+ if (!sgt) {
|
||||
+ dev_err(buf->dev, "failed to alloc sg table\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ ret = dma_get_sgtable_attrs(buf->dev, sgt, buf->cookie, buf->dma_addr,
|
||||
+ buf->size, buf->attrs);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(buf->dev, "failed to get scatterlist from DMA API\n");
|
||||
+ kfree(sgt);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ return sgt;
|
||||
+}
|
||||
+
|
||||
/*********************************************/
|
||||
/* callbacks for all buffers */
|
||||
/*********************************************/
|
||||
@@ -358,28 +380,6 @@ static const struct dma_buf_ops vb2_dc_dmabuf_ops = {
|
||||
.release = vb2_dc_dmabuf_ops_release,
|
||||
};
|
||||
|
||||
-static struct sg_table *vb2_dc_get_base_sgt(struct vb2_dc_buf *buf)
|
||||
-{
|
||||
- int ret;
|
||||
- struct sg_table *sgt;
|
||||
-
|
||||
- sgt = kmalloc(sizeof(*sgt), GFP_KERNEL);
|
||||
- if (!sgt) {
|
||||
- dev_err(buf->dev, "failed to alloc sg table\n");
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
- ret = dma_get_sgtable_attrs(buf->dev, sgt, buf->cookie, buf->dma_addr,
|
||||
- buf->size, buf->attrs);
|
||||
- if (ret < 0) {
|
||||
- dev_err(buf->dev, "failed to get scatterlist from DMA API\n");
|
||||
- kfree(sgt);
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
- return sgt;
|
||||
-}
|
||||
-
|
||||
static struct dma_buf *vb2_dc_get_dmabuf(void *buf_priv, unsigned long flags)
|
||||
{
|
||||
struct vb2_dc_buf *buf = buf_priv;
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
From 89640ed25401f53b2d144a5d1bd762e98a4d1fe3 Mon Sep 17 00:00:00 2001
|
||||
From: Heng-Ruey Hsu <henryhsu@chromium.org>
|
||||
Date: Wed, 26 Oct 2016 10:52:06 +0200
|
||||
Subject: [PATCH 06/24] MEMEKA: videobuf2-dc: Support cacheable MMAP
|
||||
|
||||
DMA allocations for MMAP type are uncached by default. But for
|
||||
some cases, CPU has to access the buffers. ie: memcpy for format
|
||||
converter. Supporting cacheable MMAP improves huge performance.
|
||||
|
||||
This patch enables cacheable memory for DMA coherent allocator in mmap
|
||||
buffer allocation if non-consistent DMA attribute is set and kernel
|
||||
mapping is present. Even if userspace doesn't mmap the buffer, sync
|
||||
still should be happening if kernel mapping is present.
|
||||
If not done in allocation, it is enabled when memory is mapped from
|
||||
userspace (if non-consistent DMA attribute is set).
|
||||
|
||||
Signed-off-by: Heng-Ruey Hsu <henryhsu@chromium.org>
|
||||
Tested-by: Heng-ruey Hsu <henryhsu@chromium.org>
|
||||
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
|
||||
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
.../common/videobuf2/videobuf2-dma-contig.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
index 1150e83c9c8d..8c868c6309b6 100644
|
||||
--- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
+++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
@@ -152,6 +152,10 @@ static void vb2_dc_put(void *buf_priv)
|
||||
sg_free_table(buf->sgt_base);
|
||||
kfree(buf->sgt_base);
|
||||
}
|
||||
+ if (buf->dma_sgt) {
|
||||
+ sg_free_table(buf->dma_sgt);
|
||||
+ kfree(buf->dma_sgt);
|
||||
+ }
|
||||
dma_free_attrs(buf->dev, buf->size, buf->cookie, buf->dma_addr,
|
||||
buf->attrs);
|
||||
put_device(buf->dev);
|
||||
@@ -193,6 +197,14 @@ static void *vb2_dc_alloc(struct device *dev, unsigned long attrs,
|
||||
buf->handler.put = vb2_dc_put;
|
||||
buf->handler.arg = buf;
|
||||
|
||||
+ /*
|
||||
+ * Enable cache maintenance. Even if userspace doesn't mmap the buffer,
|
||||
+ * sync still should be happening if kernel mapping is present.
|
||||
+ */
|
||||
+ if (!(buf->attrs & DMA_ATTR_NO_KERNEL_MAPPING) &&
|
||||
+ buf->attrs & DMA_ATTR_NON_CONSISTENT)
|
||||
+ buf->dma_sgt = vb2_dc_get_base_sgt(buf);
|
||||
+
|
||||
refcount_set(&buf->refcount, 1);
|
||||
|
||||
return buf;
|
||||
@@ -222,6 +234,10 @@ static int vb2_dc_mmap(void *buf_priv, struct vm_area_struct *vma)
|
||||
|
||||
vma->vm_ops->open(vma);
|
||||
|
||||
+ /* Enable cache maintenance if not enabled in allocation. */
|
||||
+ if (!buf->dma_sgt && buf->attrs & DMA_ATTR_NON_CONSISTENT)
|
||||
+ buf->dma_sgt = vb2_dc_get_base_sgt(buf);
|
||||
+
|
||||
pr_debug("%s: mapped dma addr 0x%08lx at 0x%08lx, size %ld\n",
|
||||
__func__, (unsigned long)buf->dma_addr, vma->vm_start,
|
||||
buf->size);
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
From 32d5826ec939e62d5c39461fb3cc4d7a54ac56e5 Mon Sep 17 00:00:00 2001
|
||||
From: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Date: Wed, 15 Feb 2017 14:08:49 +0100
|
||||
Subject: [PATCH 07/24] MEMEKA: ARM: dma-mapping: add support for
|
||||
non-consistent dma_mmap
|
||||
|
||||
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
arch/arm/mm/dma-mapping.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
|
||||
index 80d4e66039ff..afaf2e91b0bc 100644
|
||||
--- a/arch/arm/mm/dma-mapping.c
|
||||
+++ b/arch/arm/mm/dma-mapping.c
|
||||
@@ -567,7 +567,8 @@ static inline pgprot_t __get_dma_pgprot(unsigned long attrs, pgprot_t prot)
|
||||
{
|
||||
prot = (attrs & DMA_ATTR_WRITE_COMBINE) ?
|
||||
pgprot_writecombine(prot) :
|
||||
- pgprot_dmacoherent(prot);
|
||||
+ (attrs & DMA_ATTR_NON_CONSISTENT) ?
|
||||
+ prot : pgprot_dmacoherent(prot);
|
||||
return prot;
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
From db0c55db061c8e97c909158a7c309563e326f7eb Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Mon, 30 Oct 2017 09:31:09 +1030
|
||||
Subject: [PATCH 08/24] MEMEKA: media: s5p-mfc: use cacheable DMA buffers to
|
||||
improve performance
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/media/platform/s5p-mfc/s5p_mfc.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
|
||||
index 5c2a23b953a4..20d7dd992f6f 100644
|
||||
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
|
||||
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
|
||||
@@ -858,7 +858,7 @@ static int s5p_mfc_open(struct file *file)
|
||||
* We'll do mostly sequential access, so sacrifice TLB efficiency for
|
||||
* faster allocation.
|
||||
*/
|
||||
- q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES;
|
||||
+ q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES | DMA_ATTR_NON_CONSISTENT | DMA_ATTR_NO_KERNEL_MAPPING;
|
||||
q->mem_ops = &vb2_dma_contig_memops;
|
||||
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
|
||||
ret = vb2_queue_init(q);
|
||||
@@ -893,7 +893,7 @@ static int s5p_mfc_open(struct file *file)
|
||||
* We'll do mostly sequential access, so sacrifice TLB efficiency for
|
||||
* faster allocation.
|
||||
*/
|
||||
- q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES;
|
||||
+ q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES | DMA_ATTR_NON_CONSISTENT | DMA_ATTR_NO_KERNEL_MAPPING;
|
||||
q->mem_ops = &vb2_dma_contig_memops;
|
||||
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
|
||||
ret = vb2_queue_init(q);
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
From 5ed1a262d49857d2380887f130d37f4094da58a9 Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Tue, 10 Jul 2018 22:01:38 +0930
|
||||
Subject: [PATCH 09/24] MEMEKA: media: s5p-mfc: copy timestamp and timecode in
|
||||
encoder output
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
|
||||
index 912fe0c5ab18..d48e7b57d96a 100644
|
||||
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
|
||||
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
|
||||
@@ -1208,6 +1208,7 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
|
||||
{
|
||||
struct s5p_mfc_dev *dev = ctx->dev;
|
||||
struct s5p_mfc_buf *mb_entry;
|
||||
+ struct s5p_mfc_buf *dst_buf;
|
||||
unsigned long enc_y_addr = 0, enc_c_addr = 0;
|
||||
unsigned long mb_y_addr, mb_c_addr;
|
||||
int slice_type;
|
||||
@@ -1227,8 +1228,12 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
|
||||
&mb_entry->b->vb2_buf, 0);
|
||||
mb_c_addr = vb2_dma_contig_plane_dma_addr(
|
||||
&mb_entry->b->vb2_buf, 1);
|
||||
+ dst_buf = list_entry(ctx->dst_queue.next,
|
||||
+ struct s5p_mfc_buf, list);
|
||||
if ((enc_y_addr == mb_y_addr) &&
|
||||
(enc_c_addr == mb_c_addr)) {
|
||||
+ dst_buf->b->timecode = mb_entry->b->timecode;
|
||||
+ dst_buf->b->vb2_buf.timestamp = mb_entry->b->vb2_buf.timestamp;
|
||||
list_del(&mb_entry->list);
|
||||
ctx->src_queue_cnt--;
|
||||
vb2_buffer_done(&mb_entry->b->vb2_buf,
|
||||
@@ -1241,8 +1246,12 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
|
||||
&mb_entry->b->vb2_buf, 0);
|
||||
mb_c_addr = vb2_dma_contig_plane_dma_addr(
|
||||
&mb_entry->b->vb2_buf, 1);
|
||||
+ dst_buf = list_entry(ctx->dst_queue.next,
|
||||
+ struct s5p_mfc_buf, list);
|
||||
if ((enc_y_addr == mb_y_addr) &&
|
||||
(enc_c_addr == mb_c_addr)) {
|
||||
+ dst_buf->b->timecode = mb_entry->b->timecode;
|
||||
+ dst_buf->b->vb2_buf.timestamp = mb_entry->b->vb2_buf.timestamp;
|
||||
list_del(&mb_entry->list);
|
||||
ctx->ref_queue_cnt--;
|
||||
vb2_buffer_done(&mb_entry->b->vb2_buf,
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
From cc2f0760641d5e11c4af1e5517c34dd604470b27 Mon Sep 17 00:00:00 2001
|
||||
From: OtherCrashOverride <OtherCrashOverride@users.noreply.github.com>
|
||||
Date: Fri, 19 May 2017 12:59:51 +0000
|
||||
Subject: [PATCH 10/24] MEMEKA: media: s5p-mfc: stop streaming before releasing
|
||||
queues
|
||||
|
||||
If streaming is active when the MFC device is closed, it will generate an IOMMU page-fault.
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/media/platform/s5p-mfc/s5p_mfc.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
|
||||
index 20d7dd992f6f..e760e244083f 100644
|
||||
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
|
||||
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
|
||||
@@ -941,6 +941,11 @@ static int s5p_mfc_release(struct file *file)
|
||||
mfc_debug_enter();
|
||||
if (dev)
|
||||
mutex_lock(&dev->mfc_mutex);
|
||||
+
|
||||
+ /* stop streaming */
|
||||
+ vb2_streamoff(&ctx->vq_src, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
|
||||
+ vb2_streamoff(&ctx->vq_dst, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
|
||||
+
|
||||
vb2_queue_release(&ctx->vq_src);
|
||||
vb2_queue_release(&ctx->vq_dst);
|
||||
if (dev) {
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From cac7b544a26273bfd87553f1590da95b6e2faf78 Mon Sep 17 00:00:00 2001
|
||||
From: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Date: Fri, 19 Jul 2019 11:27:34 +0200
|
||||
Subject: [PATCH 11/24] MEMEKA: phy: exynos5-usbdrd: Calibrating makes sense
|
||||
only for USB2.0 PHY
|
||||
|
||||
PHY calibration is needed only for USB2.0 (UTMI) PHY, so skip calling
|
||||
calibration code when phy_calibrate() is called for USB3.0 (PIPE3) PHY.
|
||||
|
||||
Fixes: d8c80bb3b55b ("phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800")
|
||||
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/phy/samsung/phy-exynos5-usbdrd.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
|
||||
index e510732afb8b..7f6279fb4f8f 100644
|
||||
--- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
|
||||
+++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
|
||||
@@ -714,7 +714,9 @@ static int exynos5_usbdrd_phy_calibrate(struct phy *phy)
|
||||
struct phy_usb_instance *inst = phy_get_drvdata(phy);
|
||||
struct exynos5_usbdrd_phy *phy_drd = to_usbdrd_phy(inst);
|
||||
|
||||
- return exynos5420_usbdrd_phy_calibrate(phy_drd);
|
||||
+ if (inst->phy_cfg->id == EXYNOS5_DRDPHY_UTMI)
|
||||
+ return exynos5420_usbdrd_phy_calibrate(phy_drd);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static const struct phy_ops exynos5_usbdrd_phy_ops = {
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
From e3e981ecd038c1bb43a9902d90eb46019c816588 Mon Sep 17 00:00:00 2001
|
||||
From: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Date: Thu, 21 Nov 2019 11:11:45 +0100
|
||||
Subject: [PATCH 12/24] MEMEKA: clk: samsung: exynos5420: Keep top G3D clocks
|
||||
enabled
|
||||
|
||||
All top clocks on G3D path has to be enabled all the time to allow proper
|
||||
G3D power domain operation. This is achieved by adding CRITICAL flag to
|
||||
"mout_sw_aclk_g3d" clock, what keeps this clock and all its parents
|
||||
enabled.
|
||||
|
||||
This fixes following imprecise abort issue observed on Odroid XU3/XU4
|
||||
after enabling Panfrost driver by commit 1a5a85c56402 "ARM: dts: exynos:
|
||||
Add Mali/GPU node on Exynos5420 and enable it on Odroid XU3/4"):
|
||||
|
||||
panfrost 11800000.gpu: clock rate = 400000000
|
||||
panfrost 11800000.gpu: failed to get regulator: -517
|
||||
panfrost 11800000.gpu: regulator init failed -517
|
||||
Power domain G3D disable failed
|
||||
...
|
||||
panfrost 11800000.gpu: clock rate = 400000000
|
||||
8<--- cut here ---
|
||||
Unhandled fault: imprecise external abort (0x1406) at 0x00000000
|
||||
pgd = (ptrval)
|
||||
[00000000] *pgd=00000000
|
||||
Internal error: : 1406 [#1] PREEMPT SMP ARM
|
||||
Modules linked in:
|
||||
CPU: 7 PID: 53 Comm: kworker/7:1 Not tainted 5.4.0-rc8-next-20191119-00032-g56f1001191a6 #6923
|
||||
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
|
||||
Workqueue: events deferred_probe_work_func
|
||||
PC is at panfrost_gpu_soft_reset+0x94/0x110
|
||||
LR is at ___might_sleep+0x128/0x2dc
|
||||
...
|
||||
[<c05c231c>] (panfrost_gpu_soft_reset) from [<c05c2704>] (panfrost_gpu_init+0x10/0x67c)
|
||||
[<c05c2704>] (panfrost_gpu_init) from [<c05c15d0>] (panfrost_device_init+0x158/0x2cc)
|
||||
[<c05c15d0>] (panfrost_device_init) from [<c05c0cb0>] (panfrost_probe+0x80/0x178)
|
||||
[<c05c0cb0>] (panfrost_probe) from [<c05cfaa0>] (platform_drv_probe+0x48/0x9c)
|
||||
[<c05cfaa0>] (platform_drv_probe) from [<c05cd20c>] (really_probe+0x1c4/0x474)
|
||||
[<c05cd20c>] (really_probe) from [<c05cd694>] (driver_probe_device+0x78/0x1bc)
|
||||
[<c05cd694>] (driver_probe_device) from [<c05cb374>] (bus_for_each_drv+0x74/0xb8)
|
||||
[<c05cb374>] (bus_for_each_drv) from [<c05ccfa8>] (__device_attach+0xd4/0x16c)
|
||||
[<c05ccfa8>] (__device_attach) from [<c05cc110>] (bus_probe_device+0x88/0x90)
|
||||
[<c05cc110>] (bus_probe_device) from [<c05cc634>] (deferred_probe_work_func+0x4c/0xd0)
|
||||
[<c05cc634>] (deferred_probe_work_func) from [<c0149df0>] (process_one_work+0x300/0x864)
|
||||
[<c0149df0>] (process_one_work) from [<c014a3ac>] (worker_thread+0x58/0x5a0)
|
||||
[<c014a3ac>] (worker_thread) from [<c0151174>] (kthread+0x12c/0x160)
|
||||
[<c0151174>] (kthread) from [<c01010b4>] (ret_from_fork+0x14/0x20)
|
||||
Exception stack(0xee03dfb0 to 0xee03dff8)
|
||||
...
|
||||
Code: e594300c e5933020 e3130c01 1a00000f (ebefff50).
|
||||
---[ end trace badde2b74a65a540 ]---
|
||||
|
||||
In the above case, the Panfrost driver disables G3D clocks after failure
|
||||
of getting the needed regulator and return with -EPROVE_DEFER code. This
|
||||
causes G3D power domain disable failure and then, during second probe
|
||||
an imprecise abort is triggered due to undefined power domain state.
|
||||
|
||||
Fixes: 45f10dabb56b ("clk: samsung: exynos5420: Add SET_RATE_PARENT flag to clocks on G3D path")
|
||||
Fixes: c9f7567aff31 ("clk: samsung: exynos542x: Move G3D subsystem clocks to its sub-CMU")
|
||||
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
|
||||
|
||||
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/clk/samsung/clk-exynos5420.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
|
||||
index c9e5a1fb6653..bba0fe205c4e 100644
|
||||
--- a/drivers/clk/samsung/clk-exynos5420.c
|
||||
+++ b/drivers/clk/samsung/clk-exynos5420.c
|
||||
@@ -713,7 +713,7 @@ static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = {
|
||||
MUX(0, "mout_sw_aclk266_g2d", mout_sw_aclk266_g2d_p,
|
||||
SRC_TOP12, 12, 1),
|
||||
MUX_F(0, "mout_sw_aclk_g3d", mout_sw_aclk_g3d_p, SRC_TOP12, 16, 1,
|
||||
- CLK_SET_RATE_PARENT, 0),
|
||||
+ CLK_IS_CRITICAL | CLK_SET_RATE_PARENT, 0),
|
||||
MUX(0, "mout_sw_aclk300_jpeg", mout_sw_aclk300_jpeg_p,
|
||||
SRC_TOP12, 20, 1),
|
||||
MUX(CLK_MOUT_SW_ACLK300, "mout_sw_aclk300_disp1",
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
From 5babc111a40684d30905319f6e6a8688b948f5be Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Tue, 10 Jul 2018 22:13:03 +0930
|
||||
Subject: [PATCH 13/24] MEMEKA: thermal: exynos: add support for 8 trip points
|
||||
on Exynos5422 TMU
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/thermal/samsung/exynos_tmu.c | 18 ++++++++++++++++--
|
||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
|
||||
index e9a90bc23b11..b49df21fa0e7 100644
|
||||
--- a/drivers/thermal/samsung/exynos_tmu.c
|
||||
+++ b/drivers/thermal/samsung/exynos_tmu.c
|
||||
@@ -915,8 +915,6 @@ static int exynos_map_dt_data(struct platform_device *pdev)
|
||||
case SOC_ARCH_EXYNOS4412:
|
||||
case SOC_ARCH_EXYNOS5250:
|
||||
case SOC_ARCH_EXYNOS5260:
|
||||
- case SOC_ARCH_EXYNOS5420:
|
||||
- case SOC_ARCH_EXYNOS5420_TRIMINFO:
|
||||
data->tmu_set_trip_temp = exynos4412_tmu_set_trip_temp;
|
||||
data->tmu_set_trip_hyst = exynos4412_tmu_set_trip_hyst;
|
||||
data->tmu_initialize = exynos4412_tmu_initialize;
|
||||
@@ -935,6 +933,22 @@ static int exynos_map_dt_data(struct platform_device *pdev)
|
||||
data->min_efuse_value = 0;
|
||||
data->max_efuse_value = 100;
|
||||
break;
|
||||
+ case SOC_ARCH_EXYNOS5420:
|
||||
+ case SOC_ARCH_EXYNOS5420_TRIMINFO:
|
||||
+ data->tmu_set_trip_temp = exynos4412_tmu_set_trip_temp;
|
||||
+ data->tmu_set_trip_hyst = exynos4412_tmu_set_trip_hyst;
|
||||
+ data->tmu_initialize = exynos4412_tmu_initialize;
|
||||
+ data->tmu_control = exynos4210_tmu_control;
|
||||
+ data->tmu_read = exynos4412_tmu_read;
|
||||
+ data->tmu_set_emulation = exynos4412_tmu_set_emulation;
|
||||
+ data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
|
||||
+ data->ntrip = 8;
|
||||
+ data->gain = 8;
|
||||
+ data->reference_voltage = 16;
|
||||
+ data->efuse_value = 55;
|
||||
+ data->min_efuse_value = 16;
|
||||
+ data->max_efuse_value = 76;
|
||||
+ break;
|
||||
case SOC_ARCH_EXYNOS5433:
|
||||
data->tmu_set_trip_temp = exynos5433_tmu_set_trip_temp;
|
||||
data->tmu_set_trip_hyst = exynos5433_tmu_set_trip_hyst;
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
From 54322f5f719b57f603f5cb1d92d341b75e4d6ff2 Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Tue, 22 Jan 2019 11:55:07 +1030
|
||||
Subject: [PATCH 14/24] MEMEKA: arm: dts: exynos5422: enable Exynos5422 TMU
|
||||
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
|
||||
index ab27ff8bc3dc..4a4710efb429 100644
|
||||
--- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
|
||||
+++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
|
||||
@@ -1030,22 +1030,27 @@
|
||||
|
||||
&tmu_cpu0 {
|
||||
vtmu-supply = <&ldo7_reg>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&tmu_cpu1 {
|
||||
vtmu-supply = <&ldo7_reg>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&tmu_cpu2 {
|
||||
vtmu-supply = <&ldo7_reg>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&tmu_cpu3 {
|
||||
vtmu-supply = <&ldo7_reg>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&tmu_gpu {
|
||||
vtmu-supply = <&ldo7_reg>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&gpu {
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
From 674482a5933e94789105d32872adff0ffce48d01 Mon Sep 17 00:00:00 2001
|
||||
From: Lukasz Luba <l.luba@partner.samsung.com>
|
||||
Date: Wed, 7 Nov 2018 18:09:44 +0100
|
||||
Subject: [PATCH 15/24] MEMEKA: thermal: add irq-mode configuration for trip
|
||||
point
|
||||
|
||||
This patch adds support irq mode in trip point.
|
||||
When that flag is set in DT, there is no need for polling
|
||||
in thermal framework. Crossing the trip point will rise an IRQ.
|
||||
The naming convention for tip point 'type' can be confussing
|
||||
and 'passive' (whic is passive cooling) might be interpretted wrongly.
|
||||
|
||||
This mechanism prevents from missue and adds explicit setting
|
||||
for hardware which support interrupts for pre-configured temperature
|
||||
threshold.
|
||||
|
||||
Cc: Zhang Rui <rui.zhang@intel.com>
|
||||
Cc: Eduardo Valentin <edubezval@gmail.com>
|
||||
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
|
||||
Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/thermal/of-thermal.c | 17 +++++++++++++++++
|
||||
drivers/thermal/thermal_core.c | 10 ++++++++--
|
||||
include/linux/thermal.h | 5 +++++
|
||||
3 files changed, 30 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
|
||||
index 874a47d6923f..1549561e28b2 100644
|
||||
--- a/drivers/thermal/of-thermal.c
|
||||
+++ b/drivers/thermal/of-thermal.c
|
||||
@@ -315,6 +315,20 @@ static int of_thermal_get_trip_type(struct thermal_zone_device *tz, int trip,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int
|
||||
+of_thermal_get_trip_irq_mode(struct thermal_zone_device *tz, int trip,
|
||||
+ bool *mode)
|
||||
+{
|
||||
+ struct __thermal_zone *data = tz->devdata;
|
||||
+
|
||||
+ if (trip >= data->ntrips || trip < 0)
|
||||
+ return -EDOM;
|
||||
+
|
||||
+ *mode = data->trips[trip].irq_mode;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip,
|
||||
int *temp)
|
||||
{
|
||||
@@ -397,6 +411,7 @@ static struct thermal_zone_device_ops of_thermal_ops = {
|
||||
.set_mode = of_thermal_set_mode,
|
||||
|
||||
.get_trip_type = of_thermal_get_trip_type,
|
||||
+ .get_trip_irq_mode = of_thermal_get_trip_irq_mode,
|
||||
.get_trip_temp = of_thermal_get_trip_temp,
|
||||
.set_trip_temp = of_thermal_set_trip_temp,
|
||||
.get_trip_hyst = of_thermal_get_trip_hyst,
|
||||
@@ -860,6 +875,8 @@ static int thermal_of_populate_trip(struct device_node *np,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ trip->irq_mode = of_property_read_bool(np, "irq-mode");
|
||||
+
|
||||
/* Required for cooling map matching */
|
||||
trip->np = np;
|
||||
of_node_get(np);
|
||||
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
|
||||
index 9a321dc548c8..ef23a33d34b6 100644
|
||||
--- a/drivers/thermal/thermal_core.c
|
||||
+++ b/drivers/thermal/thermal_core.c
|
||||
@@ -410,6 +410,7 @@ static void handle_critical_trips(struct thermal_zone_device *tz,
|
||||
static void handle_thermal_trip(struct thermal_zone_device *tz, int trip)
|
||||
{
|
||||
enum thermal_trip_type type;
|
||||
+ bool irq_mode = false;
|
||||
|
||||
/* Ignore disabled trip points */
|
||||
if (test_bit(trip, &tz->trips_disabled))
|
||||
@@ -423,9 +424,14 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip)
|
||||
handle_non_critical_trips(tz, trip);
|
||||
/*
|
||||
* Alright, we handled this trip successfully.
|
||||
- * So, start monitoring again.
|
||||
+ * So, start monitoring in polling mode if
|
||||
+ * trip is not using irq HW support.
|
||||
*/
|
||||
- monitor_thermal_zone(tz);
|
||||
+ if (tz->ops->get_trip_irq_mode)
|
||||
+ tz->ops->get_trip_irq_mode(tz, trip, &irq_mode);
|
||||
+
|
||||
+ if (!irq_mode)
|
||||
+ monitor_thermal_zone(tz);
|
||||
}
|
||||
|
||||
static void update_temperature(struct thermal_zone_device *tz)
|
||||
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
|
||||
index c91b1e344d56..c4ce2b875b73 100644
|
||||
--- a/include/linux/thermal.h
|
||||
+++ b/include/linux/thermal.h
|
||||
@@ -92,6 +92,7 @@ struct thermal_zone_device_ops {
|
||||
enum thermal_device_mode);
|
||||
int (*get_trip_type) (struct thermal_zone_device *, int,
|
||||
enum thermal_trip_type *);
|
||||
+ int (*get_trip_irq_mode) (struct thermal_zone_device *, int, bool *);
|
||||
int (*get_trip_temp) (struct thermal_zone_device *, int, int *);
|
||||
int (*set_trip_temp) (struct thermal_zone_device *, int, int);
|
||||
int (*get_trip_hyst) (struct thermal_zone_device *, int, int *);
|
||||
@@ -185,6 +186,7 @@ struct thermal_zone_device {
|
||||
struct thermal_attr *trip_temp_attrs;
|
||||
struct thermal_attr *trip_type_attrs;
|
||||
struct thermal_attr *trip_hyst_attrs;
|
||||
+ struct thermal_attr *trip_irq_mode_attrs;
|
||||
void *devdata;
|
||||
int trips;
|
||||
unsigned long trips_disabled; /* bitmap for disabled trips */
|
||||
@@ -353,6 +355,8 @@ struct thermal_zone_of_device_ops {
|
||||
* @temperature: temperature value in miliCelsius
|
||||
* @hysteresis: relative hysteresis in miliCelsius
|
||||
* @type: trip point type
|
||||
+ * @irq_mode: to not use polling in framework set support of HW irq (which will
|
||||
+ * be triggered when temperature reaches this level).
|
||||
*/
|
||||
|
||||
struct thermal_trip {
|
||||
@@ -360,6 +364,7 @@ struct thermal_trip {
|
||||
int temperature;
|
||||
int hysteresis;
|
||||
enum thermal_trip_type type;
|
||||
+ bool irq_mode;
|
||||
};
|
||||
|
||||
/* Function declarations */
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
From 794e70326e4735707ee426d9d45f2c906a68a58d Mon Sep 17 00:00:00 2001
|
||||
From: Lukasz Luba <l.luba@partner.samsung.com>
|
||||
Date: Wed, 7 Nov 2018 18:09:45 +0100
|
||||
Subject: [PATCH 16/24] MEMEKA: thermal: add new sysfs file for irq-mode
|
||||
|
||||
Patch adds show functions for irq-mode feature.
|
||||
It allocates new attributes and extends the old list.
|
||||
|
||||
Cc: Zhang Rui <rui.zhang@intel.com>
|
||||
Cc: Eduardo Valentin <edubezval@gmail.com>
|
||||
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
|
||||
Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/thermal/thermal_sysfs.c | 53 +++++++++++++++++++++++++++++++--
|
||||
1 file changed, 51 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
|
||||
index aa99edb4dff7..e3ede8af79cc 100644
|
||||
--- a/drivers/thermal/thermal_sysfs.c
|
||||
+++ b/drivers/thermal/thermal_sysfs.c
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
#include "thermal_core.h"
|
||||
|
||||
+#define TRIP_ATTR_NUM 4
|
||||
+
|
||||
/* sys I/F for thermal zone */
|
||||
|
||||
static ssize_t
|
||||
@@ -166,6 +168,28 @@ trip_point_temp_show(struct device *dev, struct device_attribute *attr,
|
||||
return sprintf(buf, "%d\n", temperature);
|
||||
}
|
||||
|
||||
+static ssize_t
|
||||
+trip_point_irq_mode_show(struct device *dev, struct device_attribute *attr,
|
||||
+ char *buf)
|
||||
+{
|
||||
+ struct thermal_zone_device *tz = to_thermal_zone(dev);
|
||||
+ int trip, ret;
|
||||
+ bool mode;
|
||||
+
|
||||
+ if (!tz->ops->get_trip_irq_mode)
|
||||
+ return -EPERM;
|
||||
+
|
||||
+ if (sscanf(attr->attr.name, "trip_point_%d_irq", &trip) != 1)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ ret = tz->ops->get_trip_irq_mode(tz, trip, &mode);
|
||||
+
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ return sprintf(buf, "%d\n", mode);
|
||||
+}
|
||||
+
|
||||
static ssize_t
|
||||
trip_point_hyst_store(struct device *dev, struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
@@ -520,10 +544,19 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int mask)
|
||||
if (!tz->trip_type_attrs)
|
||||
return -ENOMEM;
|
||||
|
||||
+ tz->trip_irq_mode_attrs = kcalloc(tz->trips,
|
||||
+ sizeof(*tz->trip_irq_mode_attrs),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!tz->trip_irq_mode_attrs) {
|
||||
+ kfree(tz->trip_type_attrs);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
tz->trip_temp_attrs = kcalloc(tz->trips, sizeof(*tz->trip_temp_attrs),
|
||||
GFP_KERNEL);
|
||||
if (!tz->trip_temp_attrs) {
|
||||
kfree(tz->trip_type_attrs);
|
||||
+ kfree(tz->trip_irq_mode_attrs);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -533,14 +566,17 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int mask)
|
||||
GFP_KERNEL);
|
||||
if (!tz->trip_hyst_attrs) {
|
||||
kfree(tz->trip_type_attrs);
|
||||
+ kfree(tz->trip_irq_mode_attrs);
|
||||
kfree(tz->trip_temp_attrs);
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
- attrs = kcalloc(tz->trips * 3 + 1, sizeof(*attrs), GFP_KERNEL);
|
||||
+ attrs = kcalloc(tz->trips * TRIP_ATTR_NUM + 1, sizeof(*attrs),
|
||||
+ GFP_KERNEL);
|
||||
if (!attrs) {
|
||||
kfree(tz->trip_type_attrs);
|
||||
+ kfree(tz->trip_irq_mode_attrs);
|
||||
kfree(tz->trip_temp_attrs);
|
||||
if (tz->ops->get_trip_hyst)
|
||||
kfree(tz->trip_hyst_attrs);
|
||||
@@ -559,6 +595,19 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int mask)
|
||||
tz->trip_type_attrs[indx].attr.show = trip_point_type_show;
|
||||
attrs[indx] = &tz->trip_type_attrs[indx].attr.attr;
|
||||
|
||||
+ /* create trip irq_mode attribute */
|
||||
+ snprintf(tz->trip_irq_mode_attrs[indx].name,
|
||||
+ THERMAL_NAME_LENGTH, "trip_point_%d_irq", indx);
|
||||
+
|
||||
+ sysfs_attr_init(&tz->trip_irq_mode_attrs[indx].attr.attr);
|
||||
+ tz->trip_irq_mode_attrs[indx].attr.attr.name =
|
||||
+ tz->trip_irq_mode_attrs[indx].name;
|
||||
+ tz->trip_irq_mode_attrs[indx].attr.attr.mode = S_IRUGO;
|
||||
+ tz->trip_irq_mode_attrs[indx].attr.show =
|
||||
+ trip_point_irq_mode_show;
|
||||
+ attrs[indx + tz->trips * 3] =
|
||||
+ &tz->trip_irq_mode_attrs[indx].attr.attr;
|
||||
+
|
||||
/* create trip temp attribute */
|
||||
snprintf(tz->trip_temp_attrs[indx].name, THERMAL_NAME_LENGTH,
|
||||
"trip_point_%d_temp", indx);
|
||||
@@ -595,7 +644,7 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int mask)
|
||||
attrs[indx + tz->trips * 2] =
|
||||
&tz->trip_hyst_attrs[indx].attr.attr;
|
||||
}
|
||||
- attrs[tz->trips * 3] = NULL;
|
||||
+ attrs[tz->trips * TRIP_ATTR_NUM] = NULL;
|
||||
|
||||
tz->trips_attribute_group.attrs = attrs;
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
From 636a335a2705f8da4c73da01f63c696f16f5f8c2 Mon Sep 17 00:00:00 2001
|
||||
From: "k.konieczny@partner.samsung.com" <k.konieczny@partner.samsung.com>
|
||||
Date: Tue, 8 Oct 2019 15:49:23 +0200
|
||||
Subject: [PATCH 17/24] MEMEKA: devfreq: exynos-bus: workaround
|
||||
dev_pm_opp_set_rate() errors on Exynos5422/5800 SoCs
|
||||
|
||||
Commit 4294a779bd8d ("PM / devfreq: exynos-bus: Convert to use
|
||||
dev_pm_opp_set_rate()") introduced errors:
|
||||
exynos-bus: new bus device registered: soc:bus_wcore ( 84000 KHz ~ 400000 KHz)
|
||||
exynos-bus: new bus device registered: soc:bus_noc ( 67000 KHz ~ 100000 KHz)
|
||||
exynos-bus: new bus device registered: soc:bus_fsys_apb (100000 KHz ~ 200000 KHz)
|
||||
...
|
||||
exynos-bus soc:bus_wcore: dev_pm_opp_set_rate: failed to find current OPP for freq 532000000 (-34)
|
||||
exynos-bus soc:bus_noc: dev_pm_opp_set_rate: failed to find current OPP for freq 111000000 (-34)
|
||||
exynos-bus soc:bus_fsys_apb: dev_pm_opp_set_rate: failed to find current OPP for freq 222000000 (-34)
|
||||
|
||||
They are caused by incorrect PLL assigned to clock source, which results
|
||||
in clock rate outside of OPP range. Add workaround for this in
|
||||
exynos_bus_parse_of() by adjusting clock rate to those present in OPP.
|
||||
|
||||
Fixes: 4294a779bd8d ("PM / devfreq: exynos-bus: Convert to use dev_pm_opp_set_rate()")
|
||||
Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
|
||||
Signed-off-by: Kamil Konieczny <k.konieczny@partner.samsung.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/devfreq/exynos-bus.c | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
|
||||
index 8fa8eb541373..5b167eadb21e 100644
|
||||
--- a/drivers/devfreq/exynos-bus.c
|
||||
+++ b/drivers/devfreq/exynos-bus.c
|
||||
@@ -243,7 +243,7 @@ static int exynos_bus_parse_of(struct device_node *np,
|
||||
{
|
||||
struct device *dev = bus->dev;
|
||||
struct dev_pm_opp *opp;
|
||||
- unsigned long rate;
|
||||
+ unsigned long rate, opp_rate;
|
||||
int ret;
|
||||
|
||||
/* Get the clock to provide each bus with source clock */
|
||||
@@ -267,13 +267,21 @@ static int exynos_bus_parse_of(struct device_node *np,
|
||||
}
|
||||
|
||||
rate = clk_get_rate(bus->clk);
|
||||
-
|
||||
- opp = devfreq_recommended_opp(dev, &rate, 0);
|
||||
+ opp_rate = rate;
|
||||
+ opp = devfreq_recommended_opp(dev, &opp_rate, 0);
|
||||
if (IS_ERR(opp)) {
|
||||
dev_err(dev, "failed to find dev_pm_opp\n");
|
||||
ret = PTR_ERR(opp);
|
||||
goto err_opp;
|
||||
}
|
||||
+ /*
|
||||
+ * FIXME: U-boot leaves clock source at incorrect PLL, this results
|
||||
+ * in clock rate outside defined OPP rate. Work around this bug by
|
||||
+ * setting clock rate to recommended one.
|
||||
+ */
|
||||
+ if (rate > opp_rate)
|
||||
+ clk_set_rate(bus->clk, opp_rate);
|
||||
+
|
||||
bus->curr_freq = dev_pm_opp_get_freq(opp);
|
||||
dev_pm_opp_put(opp);
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
From 4e255483d743cd2d268fdb68601aa2a7a25d65c6 Mon Sep 17 00:00:00 2001
|
||||
From: Anand Moon <moon.linux@yahoo.com>
|
||||
Date: Sun, 12 Jul 2015 18:41:20 +0530
|
||||
Subject: [PATCH 18/24] MEMEKA: regulator: s2mps11: call shutdown function to
|
||||
poweroff
|
||||
|
||||
Added .shutdown function to s2mps11 to help poweroff the board successfully.
|
||||
The device driver clears the register to turn off the PMIC.
|
||||
|
||||
s2mps11-pmic: S2MPS11_REG_CTRL1 reg value 16:00000000000000000000000000010000
|
||||
|
||||
Console log.
|
||||
|
||||
* Unmounting temporary filesystems... [ OK ]
|
||||
* Deactivating swap... [ OK ]
|
||||
* Unmounting local filesystems... [ OK ]
|
||||
* Will now halt
|
||||
[ 209.020280] reboot: Power down
|
||||
[ 209.122039] Power down failed, please power off system manually.
|
||||
|
||||
Change-Id: If6ea0dec154b00ceeaaddbac393c67dc35c26279
|
||||
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
|
||||
Signed-off-by: memeka <mihailescu2m@gmail.com>
|
||||
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/regulator/s2mps11.c | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
|
||||
index 23d288278957..b3ee46955986 100644
|
||||
--- a/drivers/regulator/s2mps11.c
|
||||
+++ b/drivers/regulator/s2mps11.c
|
||||
@@ -1243,6 +1243,31 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static void s2mps11_pmic_shutdown(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
|
||||
+ unsigned int reg_val, ret;
|
||||
+
|
||||
+ ret = regmap_read(iodev->regmap_pmic, S2MPS11_REG_CTRL1, ®_val);
|
||||
+ if (ret < 0) {
|
||||
+ dev_crit(&pdev->dev, "could not read S2MPS11_REG_CTRL1 value\n");
|
||||
+ } else {
|
||||
+ /*
|
||||
+ * s2mps11-pmic: S2MPS11_REG_CTRL1 reg value
|
||||
+ * is 00000000000000000000000000010000
|
||||
+ * clear the S2MPS11_REG_CTRL1 0x10 value to shutdown.
|
||||
+ */
|
||||
+ if (reg_val & BIT(4)) {
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic,
|
||||
+ S2MPS11_REG_CTRL1,
|
||||
+ BIT(4), BIT(0));
|
||||
+ if (ret)
|
||||
+ dev_crit(&pdev->dev,
|
||||
+ "could not write S2MPS11_REG_CTRL1 value\n");
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static const struct platform_device_id s2mps11_pmic_id[] = {
|
||||
{ "s2mps11-regulator", S2MPS11X},
|
||||
{ "s2mps13-regulator", S2MPS13X},
|
||||
@@ -1258,6 +1283,7 @@ static struct platform_driver s2mps11_pmic_driver = {
|
||||
.name = "s2mps11-pmic",
|
||||
},
|
||||
.probe = s2mps11_pmic_probe,
|
||||
+ .shutdown = s2mps11_pmic_shutdown,
|
||||
.id_table = s2mps11_pmic_id,
|
||||
};
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
From f2bd0138c14fbc5a985a12240eec0f68170af9f9 Mon Sep 17 00:00:00 2001
|
||||
From: memeka <mihailescu2m@gmail.com>
|
||||
Date: Fri, 18 Jan 2019 14:36:21 +1030
|
||||
Subject: [PATCH 19/24] MEMEKA: regulator: s2mps11: add ethernet power reset in
|
||||
shutdown function
|
||||
|
||||
Ethernet device cannot be detected on warm boot sometimes. This patch is
|
||||
to add the power reset routines for ethernet device using PMIC. Then
|
||||
ethernet device can be reset hardware-wise.
|
||||
|
||||
Change-Id: Iffbe2966da7e4679f63b91ab79241167391792df
|
||||
Signed-off-by: Brian Kim <brian.kim@hardkernel.com>
|
||||
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
|
||||
---
|
||||
drivers/regulator/s2mps11.c | 54 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 54 insertions(+)
|
||||
|
||||
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
|
||||
index b3ee46955986..5c4d4827a173 100644
|
||||
--- a/drivers/regulator/s2mps11.c
|
||||
+++ b/drivers/regulator/s2mps11.c
|
||||
@@ -1117,6 +1117,57 @@ static const struct regulator_desc s2mpu02_regulators[] = {
|
||||
regulator_desc_s2mpu02_buck7(7),
|
||||
};
|
||||
|
||||
+static int s2mps11_pmic_ethonoff(struct platform_device *pdev, bool onoff)
|
||||
+{
|
||||
+ struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
|
||||
+ unsigned int reg_val = 0;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ ret = regmap_read(iodev->regmap_pmic, S2MPS11_REG_L15CTRL, ®_val);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "failed to read S2MPS11_REG_L15CTRL value\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = regmap_read(iodev->regmap_pmic, S2MPS11_REG_L17CTRL, ®_val);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "failed to read S2MPS11_REG_L17CTRL value\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ if (onoff) {
|
||||
+ /* ETH VDD0 ON */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L15CTRL, 0xFF, 0x72);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL15 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* ETH VDD1 ON */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L17CTRL, 0xFF, 0x72);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL17 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ } else {
|
||||
+ /* ETH VDD0 OFF */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L15CTRL, 0x3F, 0x00);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL15 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* ETH VDD1 OFF */
|
||||
+ ret = regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_L17CTRL, 0x3F, 0x00);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "cannot update S2MPS11 LDO CTRL17 register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static int s2mps11_pmic_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
|
||||
@@ -1266,6 +1317,9 @@ static void s2mps11_pmic_shutdown(struct platform_device *pdev)
|
||||
"could not write S2MPS11_REG_CTRL1 value\n");
|
||||
}
|
||||
}
|
||||
+ s2mps11_pmic_ethonoff(pdev, false);
|
||||
+ mdelay(10);
|
||||
+ s2mps11_pmic_ethonoff(pdev, true);
|
||||
}
|
||||
|
||||
static const struct platform_device_id s2mps11_pmic_id[] = {
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
From 3e027f1d0043d15fa88969a364a3dbe7561574fa Mon Sep 17 00:00:00 2001
|
||||
From: Marian Mihailescu <mihailescu2m@gmail.com>
|
||||
Date: Thu, 14 Nov 2019 12:19:37 +1030
|
||||
Subject: [PATCH 20/24] MEMEKA: fix eMMC clock settings
|
||||
|
||||
---
|
||||
drivers/mmc/host/dw_mmc-exynos.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/dw_mmc-exynos.h b/drivers/mmc/host/dw_mmc-exynos.h
|
||||
index 0280d394a32a..7088e39de5d2 100644
|
||||
--- a/drivers/mmc/host/dw_mmc-exynos.h
|
||||
+++ b/drivers/mmc/host/dw_mmc-exynos.h
|
||||
@@ -61,7 +61,7 @@
|
||||
/* Fixed clock divider */
|
||||
#define EXYNOS4210_FIXED_CIU_CLK_DIV 2
|
||||
#define EXYNOS4412_FIXED_CIU_CLK_DIV 4
|
||||
-#define HS400_FIXED_CIU_CLK_DIV 1
|
||||
+#define HS400_FIXED_CIU_CLK_DIV 2
|
||||
|
||||
/* Minimal required clock frequency for cclkin, unit: HZ */
|
||||
#define EXYNOS_CCLKIN_MIN 50000000
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
From 452af1bb7e2d790c440a98473f797b991cfabe0c Mon Sep 17 00:00:00 2001
|
||||
From: Brian Kim <brian.kim@hardkernel.com>
|
||||
Date: Tue, 21 Nov 2017 18:44:03 +0900
|
||||
Subject: [PATCH 21/24] MEMEKA: ODROID-XU4: arm: Set the system revision
|
||||
information
|
||||
|
||||
wiringPi library refers to this information in '/proc/cpuinfo' file.
|
||||
|
||||
Signed-off-by: Yang Deokgyu <secugyu@gmail.com>
|
||||
Change-Id: I4a3368499cecf862eddb1430c6b436283f62d2c7
|
||||
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
|
||||
---
|
||||
arch/arm/kernel/setup.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
|
||||
index d8e18cdd96d3..e302d6579c2a 100644
|
||||
--- a/arch/arm/kernel/setup.c
|
||||
+++ b/arch/arm/kernel/setup.c
|
||||
@@ -90,7 +90,7 @@ EXPORT_SYMBOL(cacheid);
|
||||
|
||||
unsigned int __atags_pointer __initdata;
|
||||
|
||||
-unsigned int system_rev;
|
||||
+unsigned int system_rev = 0x0100;
|
||||
EXPORT_SYMBOL(system_rev);
|
||||
|
||||
const char *system_serial;
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
From 09587c7785065e5cffb5cf5a9b28eeb13c574fe8 Mon Sep 17 00:00:00 2001
|
||||
From: MastaG <mastag@gmail.com>
|
||||
Date: Tue, 17 Dec 2019 09:33:19 +0100
|
||||
Subject: [PATCH 22/24] MEMEKA: fix ODROID-XU3 headphone-jack volume
|
||||
|
||||
---
|
||||
sound/soc/codecs/max98090.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
|
||||
index 032adc14562d..6448a4186618 100644
|
||||
--- a/sound/soc/codecs/max98090.c
|
||||
+++ b/sound/soc/codecs/max98090.c
|
||||
@@ -651,7 +651,7 @@ static const struct snd_kcontrol_new max98090_snd_controls[] = {
|
||||
|
||||
SOC_DOUBLE_R_TLV("Headphone Volume", M98090_REG_LEFT_HP_VOLUME,
|
||||
M98090_REG_RIGHT_HP_VOLUME, M98090_HPVOLL_SHIFT,
|
||||
- M98090_HPVOLL_NUM - 1, 0, max98090_hp_tlv),
|
||||
+ M98090_HPVOLL_NUM - 1 + 24, 0, max98090_hp_tlv),
|
||||
|
||||
SOC_DOUBLE_R_RANGE_TLV("Speaker Volume",
|
||||
M98090_REG_LEFT_SPK_VOLUME, M98090_REG_RIGHT_SPK_VOLUME,
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
From c8f80d63063aa6afd5c5e673dc32dbc593e11b94 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Thu, 12 Dec 2019 13:48:45 +0000
|
||||
Subject: [PATCH 23/24] HACK: revert mm: emit tracepoint when RSS changes
|
||||
|
||||
The correct fix is modifying the mali-midgard driver to adapt to the changes
|
||||
in newer kernels, but until that's done we need to revert this.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
include/linux/mm.h | 14 +++-----------
|
||||
include/trace/events/kmem.h | 28 ----------------------------
|
||||
mm/memory.c | 6 ------
|
||||
3 files changed, 3 insertions(+), 45 deletions(-)
|
||||
|
||||
diff --git a/include/linux/mm.h b/include/linux/mm.h
|
||||
index 5a323422d783..cebc21f191e7 100644
|
||||
--- a/include/linux/mm.h
|
||||
+++ b/include/linux/mm.h
|
||||
@@ -1836,27 +1836,19 @@ static inline unsigned long get_mm_counter(struct mm_struct *mm, int member)
|
||||
return (unsigned long)val;
|
||||
}
|
||||
|
||||
-void mm_trace_rss_stat(struct mm_struct *mm, int member, long count);
|
||||
-
|
||||
static inline void add_mm_counter(struct mm_struct *mm, int member, long value)
|
||||
{
|
||||
- long count = atomic_long_add_return(value, &mm->rss_stat.count[member]);
|
||||
-
|
||||
- mm_trace_rss_stat(mm, member, count);
|
||||
+ atomic_long_add(value, &mm->rss_stat.count[member]);
|
||||
}
|
||||
|
||||
static inline void inc_mm_counter(struct mm_struct *mm, int member)
|
||||
{
|
||||
- long count = atomic_long_inc_return(&mm->rss_stat.count[member]);
|
||||
-
|
||||
- mm_trace_rss_stat(mm, member, count);
|
||||
+ atomic_long_inc(&mm->rss_stat.count[member]);
|
||||
}
|
||||
|
||||
static inline void dec_mm_counter(struct mm_struct *mm, int member)
|
||||
{
|
||||
- long count = atomic_long_dec_return(&mm->rss_stat.count[member]);
|
||||
-
|
||||
- mm_trace_rss_stat(mm, member, count);
|
||||
+ atomic_long_dec(&mm->rss_stat.count[member]);
|
||||
}
|
||||
|
||||
/* Optimized variant when page is already known not to be PageAnon */
|
||||
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h
|
||||
index f65b1f6db22d..788e049f899c 100644
|
||||
--- a/include/trace/events/kmem.h
|
||||
+++ b/include/trace/events/kmem.h
|
||||
@@ -335,34 +335,6 @@ static unsigned int __maybe_unused mm_ptr_to_hash(const void *ptr)
|
||||
#define __PTR_TO_HASHVAL
|
||||
#endif
|
||||
|
||||
-TRACE_EVENT(rss_stat,
|
||||
-
|
||||
- TP_PROTO(struct mm_struct *mm,
|
||||
- int member,
|
||||
- long count),
|
||||
-
|
||||
- TP_ARGS(mm, member, count),
|
||||
-
|
||||
- TP_STRUCT__entry(
|
||||
- __field(unsigned int, mm_id)
|
||||
- __field(unsigned int, curr)
|
||||
- __field(int, member)
|
||||
- __field(long, size)
|
||||
- ),
|
||||
-
|
||||
- TP_fast_assign(
|
||||
- __entry->mm_id = mm_ptr_to_hash(mm);
|
||||
- __entry->curr = !!(current->mm == mm);
|
||||
- __entry->member = member;
|
||||
- __entry->size = (count << PAGE_SHIFT);
|
||||
- ),
|
||||
-
|
||||
- TP_printk("mm_id=%u curr=%d member=%d size=%ldB",
|
||||
- __entry->mm_id,
|
||||
- __entry->curr,
|
||||
- __entry->member,
|
||||
- __entry->size)
|
||||
- );
|
||||
#endif /* _TRACE_KMEM_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
diff --git a/mm/memory.c b/mm/memory.c
|
||||
index f703fe8c8346..796c5a62e173 100644
|
||||
--- a/mm/memory.c
|
||||
+++ b/mm/memory.c
|
||||
@@ -72,8 +72,6 @@
|
||||
#include <linux/oom.h>
|
||||
#include <linux/numa.h>
|
||||
|
||||
-#include <trace/events/kmem.h>
|
||||
-
|
||||
#include <asm/io.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/pgalloc.h>
|
||||
@@ -154,10 +152,6 @@ static int __init init_zero_pfn(void)
|
||||
}
|
||||
core_initcall(init_zero_pfn);
|
||||
|
||||
-void mm_trace_rss_stat(struct mm_struct *mm, int member, long count)
|
||||
-{
|
||||
- trace_rss_stat(mm, member, count);
|
||||
-}
|
||||
|
||||
#if defined(SPLIT_RSS_COUNTING)
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
From fe64d2622d6fd880f35da93382e1de5077b681f3 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Wed, 29 Apr 2020 10:37:08 +0000
|
||||
Subject: [PATCH 24/24] WIP: ARM: dts: exynos5422: HC1/XU3/XU4 model name is
|
||||
ODROID not Odroid
|
||||
|
||||
Cosmetic change to model and audio card name for HC1/XU3/XU4 to
|
||||
put ODROID in capitals (as per Hardkernel branding). Also fixup
|
||||
some unneeded backslashes and wrap lines per kernel standards.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5422-odroidhc1.dts | 4 ++--
|
||||
arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi | 2 +-
|
||||
arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts | 5 +++--
|
||||
arch/arm/boot/dts/exynos5422-odroidxu3.dts | 5 +++--
|
||||
arch/arm/boot/dts/exynos5422-odroidxu4.dts | 6 +++---
|
||||
5 files changed, 12 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5422-odroidhc1.dts b/arch/arm/boot/dts/exynos5422-odroidhc1.dts
|
||||
index 812659260278..b90da73510cf 100644
|
||||
--- a/arch/arm/boot/dts/exynos5422-odroidhc1.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5422-odroidhc1.dts
|
||||
@@ -11,8 +11,8 @@
|
||||
#include "exynos5422-odroid-core.dtsi"
|
||||
|
||||
/ {
|
||||
- model = "Hardkernel Odroid HC1";
|
||||
- compatible = "hardkernel,odroid-hc1", "samsung,exynos5800", \
|
||||
+ model = "Hardkernel ODROID HC1";
|
||||
+ compatible = "hardkernel,odroid-hc1", "samsung,exynos5800",
|
||||
"samsung,exynos5";
|
||||
|
||||
pwmleds {
|
||||
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi
|
||||
index c3c2d85267da..26961dcea010 100644
|
||||
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi
|
||||
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi
|
||||
@@ -13,7 +13,7 @@
|
||||
/ {
|
||||
sound: sound {
|
||||
compatible = "samsung,odroid-xu3-audio";
|
||||
- model = "Odroid-XU3";
|
||||
+ model = "ODROID-XU3";
|
||||
|
||||
samsung,audio-widgets =
|
||||
"Headphone", "Headphone Jack",
|
||||
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts b/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts
|
||||
index 98feecad5489..d0084033199a 100644
|
||||
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts
|
||||
@@ -14,8 +14,9 @@
|
||||
#include "exynos54xx-odroidxu-leds.dtsi"
|
||||
|
||||
/ {
|
||||
- model = "Hardkernel Odroid XU3 Lite";
|
||||
- compatible = "hardkernel,odroid-xu3-lite", "samsung,exynos5800", "samsung,exynos5";
|
||||
+ model = "Hardkernel ODROID XU3 Lite";
|
||||
+ compatible = "hardkernel,odroid-xu3-lite", "samsung,exynos5800",
|
||||
+ "samsung,exynos5";
|
||||
};
|
||||
|
||||
&arm_a7_pmu {
|
||||
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
|
||||
index db0bc17a667b..3ff7ec514e20 100644
|
||||
--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
|
||||
@@ -13,8 +13,9 @@
|
||||
#include "exynos54xx-odroidxu-leds.dtsi"
|
||||
|
||||
/ {
|
||||
- model = "Hardkernel Odroid XU3";
|
||||
- compatible = "hardkernel,odroid-xu3", "samsung,exynos5800", "samsung,exynos5";
|
||||
+ model = "Hardkernel ODROID XU3";
|
||||
+ compatible = "hardkernel,odroid-xu3", "samsung,exynos5800",
|
||||
+ "samsung,exynos5";
|
||||
};
|
||||
|
||||
&i2c_0 {
|
||||
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu4.dts b/arch/arm/boot/dts/exynos5422-odroidxu4.dts
|
||||
index 892d389d6d09..d2061b244537 100644
|
||||
--- a/arch/arm/boot/dts/exynos5422-odroidxu4.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5422-odroidxu4.dts
|
||||
@@ -13,8 +13,8 @@
|
||||
#include "exynos5422-odroidxu3-common.dtsi"
|
||||
|
||||
/ {
|
||||
- model = "Hardkernel Odroid XU4";
|
||||
- compatible = "hardkernel,odroid-xu4", "samsung,exynos5800", \
|
||||
+ model = "Hardkernel ODROID XU4";
|
||||
+ compatible = "hardkernel,odroid-xu4", "samsung,exynos5800",
|
||||
"samsung,exynos5";
|
||||
|
||||
pwmleds {
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
sound: sound {
|
||||
compatible = "samsung,odroid-xu3-audio";
|
||||
- model = "Odroid-XU4";
|
||||
+ model = "ODROID-XU4";
|
||||
|
||||
samsung,audio-routing = "I2S Playback", "Mixer DAI TX";
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue