* [PATCH -next] EDAC: aspeed: Remove set but not used variable 'np'
From: Andrew Jeffery @ 2019-05-29 1:27 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190525144153.2028-1-yuehaibing@huawei.com>
On Sun, 26 May 2019, at 00:12, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/edac/aspeed_edac.c: In function aspeed_probe:
> drivers/edac/aspeed_edac.c:284:22: warning: variable np set but not
> used [-Wunused-but-set-variable]
>
> It is never used and can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> drivers/edac/aspeed_edac.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
> index 11833c0a5d07..5634437bb39d 100644
> --- a/drivers/edac/aspeed_edac.c
> +++ b/drivers/edac/aspeed_edac.c
> @@ -281,15 +281,11 @@ static int aspeed_probe(struct platform_device *pdev)
> struct device *dev = &pdev->dev;
> struct edac_mc_layer layers[2];
> struct mem_ctl_info *mci;
> - struct device_node *np;
> struct resource *res;
> void __iomem *regs;
> u32 reg04;
> int rc;
>
> - /* setup regmap */
> - np = dev->of_node;
> -
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> if (!res)
> return -ENOENT;
> --
> 2.17.1
>
>
>
^ permalink raw reply
* [PATCH] ARM: dts: aspeed: g4: add video engine support
From: Andrew Jeffery @ 2019-05-29 1:22 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190527112753.1681-1-a.filippov@yadro.com>
On Mon, 27 May 2019, at 20:58, Alexander Filippov wrote:
> Add a node to describe the video engine and VGA scratch registers on
> AST2400.
>
> These changes were copied from aspeed-g5.dtsi
>
> Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
Ugh, I should really sort out the bmc-misc stuff, I don't like to see it propagate
in its current form. That's not your problem though, and I hope to address it in
the near future.
For the OpenBMC kernel tree:
Acked-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> arch/arm/boot/dts/aspeed-g4.dtsi | 62 ++++++++++++++++++++++++++++++++
> 1 file changed, 62 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
> index 6011692df15a..adc1804918df 100644
> --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> @@ -168,6 +168,10 @@
> compatible = "aspeed,g4-pinctrl";
> };
>
> + vga_scratch: scratch {
> + compatible = "aspeed,bmc-misc";
> + };
> +
> p2a: p2a-control {
> compatible = "aspeed,ast2400-p2a-ctrl";
> status = "disabled";
> @@ -195,6 +199,16 @@
> reg = <0x1e720000 0x8000>; // 32K
> };
>
> + video: video at 1e700000 {
> + compatible = "aspeed,ast2400-video-engine";
> + reg = <0x1e700000 0x1000>;
> + clocks = <&syscon ASPEED_CLK_GATE_VCLK>,
> + <&syscon ASPEED_CLK_GATE_ECLK>;
> + clock-names = "vclk", "eclk";
> + interrupts = <7>;
> + status = "disabled";
> + };
> +
> gpio: gpio at 1e780000 {
> #gpio-cells = <2>;
> gpio-controller;
> @@ -1408,6 +1422,54 @@
> };
> };
>
> +&vga_scratch {
> + dac_mux {
> + offset = <0x2c>;
> + bit-mask = <0x3>;
> + bit-shift = <16>;
> + };
> + vga0 {
> + offset = <0x50>;
> + bit-mask = <0xffffffff>;
> + bit-shift = <0>;
> + };
> + vga1 {
> + offset = <0x54>;
> + bit-mask = <0xffffffff>;
> + bit-shift = <0>;
> + };
> + vga2 {
> + offset = <0x58>;
> + bit-mask = <0xffffffff>;
> + bit-shift = <0>;
> + };
> + vga3 {
> + offset = <0x5c>;
> + bit-mask = <0xffffffff>;
> + bit-shift = <0>;
> + };
> + vga4 {
> + offset = <0x60>;
> + bit-mask = <0xffffffff>;
> + bit-shift = <0>;
> + };
> + vga5 {
> + offset = <0x64>;
> + bit-mask = <0xffffffff>;
> + bit-shift = <0>;
> + };
> + vga6 {
> + offset = <0x68>;
> + bit-mask = <0xffffffff>;
> + bit-shift = <0>;
> + };
> + vga7 {
> + offset = <0x6c>;
> + bit-mask = <0xffffffff>;
> + bit-shift = <0>;
> + };
> +};
> +
> &sio_regs {
> sio_2b {
> offset = <0xf0>;
> --
> 2.20.1
>
>
^ permalink raw reply
* [PATCH] ARM: dts: aspeed: g4: add video engine support
From: Alexander Filippov @ 2019-05-27 11:27 UTC (permalink / raw)
To: linux-aspeed
Add a node to describe the video engine and VGA scratch registers on
AST2400.
These changes were copied from aspeed-g5.dtsi
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
---
arch/arm/boot/dts/aspeed-g4.dtsi | 62 ++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
index 6011692df15a..adc1804918df 100644
--- a/arch/arm/boot/dts/aspeed-g4.dtsi
+++ b/arch/arm/boot/dts/aspeed-g4.dtsi
@@ -168,6 +168,10 @@
compatible = "aspeed,g4-pinctrl";
};
+ vga_scratch: scratch {
+ compatible = "aspeed,bmc-misc";
+ };
+
p2a: p2a-control {
compatible = "aspeed,ast2400-p2a-ctrl";
status = "disabled";
@@ -195,6 +199,16 @@
reg = <0x1e720000 0x8000>; // 32K
};
+ video: video at 1e700000 {
+ compatible = "aspeed,ast2400-video-engine";
+ reg = <0x1e700000 0x1000>;
+ clocks = <&syscon ASPEED_CLK_GATE_VCLK>,
+ <&syscon ASPEED_CLK_GATE_ECLK>;
+ clock-names = "vclk", "eclk";
+ interrupts = <7>;
+ status = "disabled";
+ };
+
gpio: gpio at 1e780000 {
#gpio-cells = <2>;
gpio-controller;
@@ -1408,6 +1422,54 @@
};
};
+&vga_scratch {
+ dac_mux {
+ offset = <0x2c>;
+ bit-mask = <0x3>;
+ bit-shift = <16>;
+ };
+ vga0 {
+ offset = <0x50>;
+ bit-mask = <0xffffffff>;
+ bit-shift = <0>;
+ };
+ vga1 {
+ offset = <0x54>;
+ bit-mask = <0xffffffff>;
+ bit-shift = <0>;
+ };
+ vga2 {
+ offset = <0x58>;
+ bit-mask = <0xffffffff>;
+ bit-shift = <0>;
+ };
+ vga3 {
+ offset = <0x5c>;
+ bit-mask = <0xffffffff>;
+ bit-shift = <0>;
+ };
+ vga4 {
+ offset = <0x60>;
+ bit-mask = <0xffffffff>;
+ bit-shift = <0>;
+ };
+ vga5 {
+ offset = <0x64>;
+ bit-mask = <0xffffffff>;
+ bit-shift = <0>;
+ };
+ vga6 {
+ offset = <0x68>;
+ bit-mask = <0xffffffff>;
+ bit-shift = <0>;
+ };
+ vga7 {
+ offset = <0x6c>;
+ bit-mask = <0xffffffff>;
+ bit-shift = <0>;
+ };
+};
+
&sio_regs {
sio_2b {
offset = <0xf0>;
--
2.20.1
^ permalink raw reply related
* [PATCH -next] EDAC: aspeed: Remove set but not used variable 'np'
From: YueHaibing @ 2019-05-25 14:41 UTC (permalink / raw)
To: linux-aspeed
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/edac/aspeed_edac.c: In function aspeed_probe:
drivers/edac/aspeed_edac.c:284:22: warning: variable np set but not used [-Wunused-but-set-variable]
It is never used and can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/edac/aspeed_edac.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
index 11833c0a5d07..5634437bb39d 100644
--- a/drivers/edac/aspeed_edac.c
+++ b/drivers/edac/aspeed_edac.c
@@ -281,15 +281,11 @@ static int aspeed_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct edac_mc_layer layers[2];
struct mem_ctl_info *mci;
- struct device_node *np;
struct resource *res;
void __iomem *regs;
u32 reg04;
int rc;
- /* setup regmap */
- np = dev->of_node;
-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -ENOENT;
--
2.17.1
^ permalink raw reply related
* [PATCH v2 11/11] media: aspeed: add a workaround to fix a silicon bug
From: Jae Hyun Yoo @ 2019-05-24 23:17 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190524231725.12320-1-jae.hyun.yoo@linux.intel.com>
AST2500 silicon revision A1 and A2 have a silicon bug which causes
extremly long capturing time on specific resolutions (1680 width).
To fix the bug, this commit adjusts the capturing window register
setting to 1728 if detected width is 1680. The compression window
register setting will be kept as the original width so output
result will be the same.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
---
v1 -> v2:
New.
drivers/media/platform/aspeed-video.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index b05b073b63bc..f93989f532d6 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -824,8 +824,27 @@ static void aspeed_video_set_resolution(struct aspeed_video *video)
struct v4l2_bt_timings *act = &video->active_timings;
unsigned int size = act->width * act->height;
+ /* Set capture/compression frame sizes */
aspeed_video_calc_compressed_size(video, size);
+ if (video->active_timings.width == 1680) {
+ /*
+ * This is a workaround to fix a silicon bug on A1 and A2
+ * revisions. Since it doesn't break capturing operation on A0
+ * revision, use it for all revisions without checking the
+ * revision ID.
+ */
+ aspeed_video_write(video, VE_CAP_WINDOW,
+ 1728 << 16 | act->height);
+ size += (1728 - 1680) * video->active_timings.height;
+ } else {
+ aspeed_video_write(video, VE_CAP_WINDOW,
+ act->width << 16 | act->height);
+ }
+ aspeed_video_write(video, VE_COMP_WINDOW,
+ act->width << 16 | act->height);
+ aspeed_video_write(video, VE_SRC_SCANLINE_OFFSET, act->width * 4);
+
/* Don't use direct mode below 1024 x 768 (irqs don't fire) */
if (size < DIRECT_FETCH_THRESHOLD) {
aspeed_video_write(video, VE_TGS_0,
@@ -842,13 +861,6 @@ static void aspeed_video_set_resolution(struct aspeed_video *video)
aspeed_video_update(video, VE_CTRL, 0, VE_CTRL_DIRECT_FETCH);
}
- /* Set capture/compression frame sizes */
- aspeed_video_write(video, VE_CAP_WINDOW,
- act->width << 16 | act->height);
- aspeed_video_write(video, VE_COMP_WINDOW,
- act->width << 16 | act->height);
- aspeed_video_write(video, VE_SRC_SCANLINE_OFFSET, act->width * 4);
-
size *= 4;
if (size == video->srcs[0].size / 2) {
--
2.21.0
^ permalink raw reply related
* [PATCH v2 10/11] media: aspeed: fix an incorrect timeout checking in mode detection
From: Jae Hyun Yoo @ 2019-05-24 23:17 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190524231725.12320-1-jae.hyun.yoo@linux.intel.com>
There is an incorrect timeout checking in mode detection logic so
it misses resolution detecting chances. This commit fixes the bug.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
---
v1 -> v2:
New.
drivers/media/platform/aspeed-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index 67f476bf0a03..b05b073b63bc 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -735,7 +735,7 @@ static void aspeed_video_get_resolution(struct aspeed_video *video)
do {
if (tries) {
set_current_state(TASK_INTERRUPTIBLE);
- if (schedule_timeout(INVALID_RESOLUTION_DELAY))
+ if (!schedule_timeout(INVALID_RESOLUTION_DELAY))
return;
}
--
2.21.0
^ permalink raw reply related
* [PATCH v2 09/11] media: aspeed: use different delays for triggering VE H/W reset
From: Jae Hyun Yoo @ 2019-05-24 23:17 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190524231725.12320-1-jae.hyun.yoo@linux.intel.com>
In case of watchdog timeout detected while doing mode detection,
it's better triggering video engine hardware reset immediately so
this commit fixes code for the case. Other than the case, it will
trigger video engine hardware reset after RESOLUTION_CHANGE_DELAY.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
---
v1 -> v2:
New.
drivers/media/platform/aspeed-video.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index 4647ed2e9e63..67f476bf0a03 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -522,7 +522,7 @@ static void aspeed_video_bufs_done(struct aspeed_video *video,
spin_unlock_irqrestore(&video->lock, flags);
}
-static void aspeed_video_irq_res_change(struct aspeed_video *video)
+static void aspeed_video_irq_res_change(struct aspeed_video *video, ulong delay)
{
dev_dbg(video->dev, "Resolution changed; resetting\n");
@@ -532,7 +532,7 @@ static void aspeed_video_irq_res_change(struct aspeed_video *video)
aspeed_video_off(video);
aspeed_video_bufs_done(video, VB2_BUF_STATE_ERROR);
- schedule_delayed_work(&video->res_work, RESOLUTION_CHANGE_DELAY);
+ schedule_delayed_work(&video->res_work, delay);
}
static irqreturn_t aspeed_video_irq(int irq, void *arg)
@@ -545,7 +545,7 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg)
* re-initialize
*/
if (sts & VE_INTERRUPT_MODE_DETECT_WD) {
- aspeed_video_irq_res_change(video);
+ aspeed_video_irq_res_change(video, 0);
return IRQ_HANDLED;
}
@@ -563,7 +563,8 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg)
* Signal acquired while NOT doing resolution
* detection; reset the engine and re-initialize
*/
- aspeed_video_irq_res_change(video);
+ aspeed_video_irq_res_change(video,
+ RESOLUTION_CHANGE_DELAY);
return IRQ_HANDLED;
}
}
--
2.21.0
^ permalink raw reply related
* [PATCH v2 08/11] media: aspeed: remove source buffer allocation before mode detection
From: Jae Hyun Yoo @ 2019-05-24 23:17 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190524231725.12320-1-jae.hyun.yoo@linux.intel.com>
Mode detection doesn't require source buffer allocation so this
commit removes that.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
---
v1 -> v2:
New.
drivers/media/platform/aspeed-video.c | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index c0b889141b8f..4647ed2e9e63 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -731,27 +731,6 @@ static void aspeed_video_get_resolution(struct aspeed_video *video)
det->height = MIN_HEIGHT;
video->v4l2_input_status = V4L2_IN_ST_NO_SIGNAL;
- /*
- * Since we need max buffer size for detection, free the second source
- * buffer first.
- */
- if (video->srcs[1].size)
- aspeed_video_free_buf(video, &video->srcs[1]);
-
- if (video->srcs[0].size < VE_MAX_SRC_BUFFER_SIZE) {
- if (video->srcs[0].size)
- aspeed_video_free_buf(video, &video->srcs[0]);
-
- if (!aspeed_video_alloc_buf(video, &video->srcs[0],
- VE_MAX_SRC_BUFFER_SIZE)) {
- dev_err(video->dev,
- "Failed to allocate source buffers\n");
- return;
- }
- }
-
- aspeed_video_write(video, VE_SRC0_ADDR, video->srcs[0].dma);
-
do {
if (tries) {
set_current_state(TASK_INTERRUPTIBLE);
--
2.21.0
^ permalink raw reply related
* [PATCH v2 07/11] media: aspeed: refine interrupt handling logic
From: Jae Hyun Yoo @ 2019-05-24 23:17 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190524231725.12320-1-jae.hyun.yoo@linux.intel.com>
There are cases that interrupt bits are cleared by a 500ms delayed
work which causes unnecessary irq calls. Also, the current
interrupt handler returns IRQ_HANDLED always but it should return
IRQ_NONE if there is any unhandled interrupt. So this commit
refines the interrupt handling logic to fix these issues.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
---
v1 -> v2:
None.
drivers/media/platform/aspeed-video.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index 1cba582918cc..c0b889141b8f 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -488,6 +488,7 @@ static void aspeed_video_off(struct aspeed_video *video)
/* Disable interrupts */
aspeed_video_write(video, VE_INTERRUPT_CTRL, 0);
+ aspeed_video_write(video, VE_INTERRUPT_STATUS, 0xffffffff);
/* Turn off the relevant clocks */
clk_disable(video->vclk);
@@ -554,7 +555,7 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg)
VE_INTERRUPT_MODE_DETECT, 0);
aspeed_video_write(video, VE_INTERRUPT_STATUS,
VE_INTERRUPT_MODE_DETECT);
-
+ sts &= ~VE_INTERRUPT_MODE_DETECT;
set_bit(VIDEO_MODE_DETECT_DONE, &video->flags);
wake_up_interruptible_all(&video->wait);
} else {
@@ -599,12 +600,12 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg)
VE_INTERRUPT_COMP_COMPLETE, 0);
aspeed_video_write(video, VE_INTERRUPT_STATUS,
VE_INTERRUPT_COMP_COMPLETE);
-
+ sts &= ~VE_INTERRUPT_COMP_COMPLETE;
if (test_bit(VIDEO_STREAMING, &video->flags) && buf)
aspeed_video_start_frame(video);
}
- return IRQ_HANDLED;
+ return sts ? IRQ_NONE : IRQ_HANDLED;
}
static void aspeed_video_check_and_set_polarity(struct aspeed_video *video)
--
2.21.0
^ permalink raw reply related
* [PATCH v2 06/11] media: aspeed: remove checking of VE_INTERRUPT_CAPTURE_COMPLETE
From: Jae Hyun Yoo @ 2019-05-24 23:17 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190524231725.12320-1-jae.hyun.yoo@linux.intel.com>
VE_INTERRUPT_CAPTURE_COMPLETE and VE_INTERRUPT_COMP_COMPLETE are
not set at the same time but the current interrupt handling
mechanism of this driver doesn't clear the interrupt flag until
both two are set, and this behavior causes unnecessary interrupt
handler calls. In fact, this driver provides JPEG format only so
taking care of the VE_INTERRUPT_COMP_COMPLETE is enough for getting
compressed image frame so this commit gets rid of the
VE_INTERRUPT_CAPTURE_COMPLETE checking logic to simplify the logic.
Handling of VE_INTERRUPT_CAPTURE_COMPLETE could be added back later
when it's actually needed.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
---
v1 -> v2:
None.
drivers/media/platform/aspeed-video.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index 92abdfc79e76..1cba582918cc 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -463,8 +463,7 @@ static int aspeed_video_start_frame(struct aspeed_video *video)
aspeed_video_write(video, VE_COMP_ADDR, addr);
aspeed_video_update(video, VE_INTERRUPT_CTRL, 0,
- VE_INTERRUPT_COMP_COMPLETE |
- VE_INTERRUPT_CAPTURE_COMPLETE);
+ VE_INTERRUPT_COMP_COMPLETE);
aspeed_video_update(video, VE_SEQ_CTRL, 0,
VE_SEQ_CTRL_TRIG_CAPTURE | VE_SEQ_CTRL_TRIG_COMP);
@@ -568,8 +567,7 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg)
}
}
- if ((sts & VE_INTERRUPT_COMP_COMPLETE) &&
- (sts & VE_INTERRUPT_CAPTURE_COMPLETE)) {
+ if (sts & VE_INTERRUPT_COMP_COMPLETE) {
struct aspeed_video_buffer *buf;
u32 frame_size = aspeed_video_read(video,
VE_OFFSET_COMP_STREAM);
@@ -598,11 +596,9 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg)
VE_SEQ_CTRL_FORCE_IDLE |
VE_SEQ_CTRL_TRIG_COMP, 0);
aspeed_video_update(video, VE_INTERRUPT_CTRL,
- VE_INTERRUPT_COMP_COMPLETE |
- VE_INTERRUPT_CAPTURE_COMPLETE, 0);
+ VE_INTERRUPT_COMP_COMPLETE, 0);
aspeed_video_write(video, VE_INTERRUPT_STATUS,
- VE_INTERRUPT_COMP_COMPLETE |
- VE_INTERRUPT_CAPTURE_COMPLETE);
+ VE_INTERRUPT_COMP_COMPLETE);
if (test_bit(VIDEO_STREAMING, &video->flags) && buf)
aspeed_video_start_frame(video);
--
2.21.0
^ permalink raw reply related
* [PATCH v2 05/11] media: aspeed: reduce noisy log printing outs
From: Jae Hyun Yoo @ 2019-05-24 23:17 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190524231725.12320-1-jae.hyun.yoo@linux.intel.com>
Currently, this driver prints out too much log messages when a
mode change happens, video turned off by screen saver and etc.
Actually, all cases are reported to user space properly. Also,
these are not critical errors but recoverable things, so this
commit changes the log level of some noisy printing outs.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
---
v1 -> v2:
None.
drivers/media/platform/aspeed-video.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index d1b541409544..92abdfc79e76 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -441,7 +441,7 @@ static int aspeed_video_start_frame(struct aspeed_video *video)
if (!(seq_ctrl & VE_SEQ_CTRL_COMP_BUSY) ||
!(seq_ctrl & VE_SEQ_CTRL_CAP_BUSY)) {
- dev_err(video->dev, "Engine busy; don't start frame\n");
+ dev_dbg(video->dev, "Engine busy; don't start frame\n");
return -EBUSY;
}
@@ -769,7 +769,7 @@ static void aspeed_video_get_resolution(struct aspeed_video *video)
res_check(video),
MODE_DETECT_TIMEOUT);
if (!rc) {
- dev_err(video->dev, "Timed out; first mode detect\n");
+ dev_dbg(video->dev, "Timed out; first mode detect\n");
clear_bit(VIDEO_RES_DETECT, &video->flags);
return;
}
@@ -787,7 +787,7 @@ static void aspeed_video_get_resolution(struct aspeed_video *video)
MODE_DETECT_TIMEOUT);
clear_bit(VIDEO_RES_DETECT, &video->flags);
if (!rc) {
- dev_err(video->dev, "Timed out; second mode detect\n");
+ dev_dbg(video->dev, "Timed out; second mode detect\n");
return;
}
@@ -821,7 +821,7 @@ static void aspeed_video_get_resolution(struct aspeed_video *video)
} while (invalid_resolution && (tries++ < INVALID_RESOLUTION_RETRIES));
if (invalid_resolution) {
- dev_err(video->dev, "Invalid resolution detected\n");
+ dev_dbg(video->dev, "Invalid resolution detected\n");
return;
}
@@ -1456,7 +1456,7 @@ static void aspeed_video_stop_streaming(struct vb2_queue *q)
!test_bit(VIDEO_FRAME_INPRG, &video->flags),
STOP_TIMEOUT);
if (!rc) {
- dev_err(video->dev, "Timed out when stopping streaming\n");
+ dev_dbg(video->dev, "Timed out when stopping streaming\n");
/*
* Need to force stop any DMA and try and get HW into a good
--
2.21.0
^ permalink raw reply related
* [PATCH v2 04/11] media: aspeed: remove IRQF_SHARED flag
From: Jae Hyun Yoo @ 2019-05-24 23:17 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190524231725.12320-1-jae.hyun.yoo@linux.intel.com>
Video Engine has a dedicated interrupt line so this driver doesn't
need to use IRQF_SHARED flag so remove it. Also, it'd be good for
following what Thomas recommended in the IRQF_ONESHOT support
patch like below:
"Note that for now IRQF_ONESHOT cannot be used with IRQF_SHARED to
avoid complex accounting mechanisms."
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
---
v1 -> v2:
None.
drivers/media/platform/aspeed-video.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index f7db8969c8f2..d1b541409544 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -1601,8 +1601,7 @@ static int aspeed_video_init(struct aspeed_video *video)
}
rc = devm_request_threaded_irq(dev, irq, NULL, aspeed_video_irq,
- IRQF_ONESHOT | IRQF_SHARED, DEVICE_NAME,
- video);
+ IRQF_ONESHOT, DEVICE_NAME, video);
if (rc < 0) {
dev_err(dev, "Unable to request IRQ %d\n", irq);
return rc;
--
2.21.0
^ permalink raw reply related
* [PATCH v2 03/11] media: aspeed: change irq to threaded irq
From: Jae Hyun Yoo @ 2019-05-24 23:17 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190524231725.12320-1-jae.hyun.yoo@linux.intel.com>
Differently from other Aspeed drivers, this driver calls clock
control APIs in interrupt context. Since ECLK is coupled with a
reset bit in clk-aspeed module, aspeed_clk_enable will make 10ms of
busy waiting delay for triggering the reset and it will eventually
disturb other drivers' interrupt handling. To fix this issue, this
commit changes this driver's irq to threaded irq so that the delay
can be happened in a thread context.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
---
v1 -> v2:
None.
drivers/media/platform/aspeed-video.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index 7982ce634936..f7db8969c8f2 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -1600,8 +1600,9 @@ static int aspeed_video_init(struct aspeed_video *video)
return -ENODEV;
}
- rc = devm_request_irq(dev, irq, aspeed_video_irq, IRQF_SHARED,
- DEVICE_NAME, video);
+ rc = devm_request_threaded_irq(dev, irq, NULL, aspeed_video_irq,
+ IRQF_ONESHOT | IRQF_SHARED, DEVICE_NAME,
+ video);
if (rc < 0) {
dev_err(dev, "Unable to request IRQ %d\n", irq);
return rc;
--
2.21.0
^ permalink raw reply related
* [PATCH v2 02/11] media: aspeed: refine clock control logic
From: Jae Hyun Yoo @ 2019-05-24 23:17 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190524231725.12320-1-jae.hyun.yoo@linux.intel.com>
Currently, this driver calls clk_prepare and clk_unprepare from
interrupt context too but these should be called from sleepable
context only. To fix this issue, this commit splits out
clk_enable/disable and clk_prepare/unprepare, and it places
clk_prepare/unprepare calls into the module probe/remove function.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
---
v1 -> v2:
None.
drivers/media/platform/aspeed-video.c | 38 ++++++++++++++++++++-------
1 file changed, 29 insertions(+), 9 deletions(-)
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index 562d7c0adc78..7982ce634936 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -491,8 +491,8 @@ static void aspeed_video_off(struct aspeed_video *video)
aspeed_video_write(video, VE_INTERRUPT_CTRL, 0);
/* Turn off the relevant clocks */
- clk_disable_unprepare(video->vclk);
- clk_disable_unprepare(video->eclk);
+ clk_disable(video->vclk);
+ clk_disable(video->eclk);
clear_bit(VIDEO_CLOCKS_ON, &video->flags);
}
@@ -503,8 +503,8 @@ static void aspeed_video_on(struct aspeed_video *video)
return;
/* Turn on the relevant clocks */
- clk_prepare_enable(video->eclk);
- clk_prepare_enable(video->vclk);
+ clk_enable(video->eclk);
+ clk_enable(video->vclk);
set_bit(VIDEO_CLOCKS_ON, &video->flags);
}
@@ -1613,31 +1613,46 @@ static int aspeed_video_init(struct aspeed_video *video)
return PTR_ERR(video->eclk);
}
+ rc = clk_prepare(video->eclk);
+ if (rc)
+ return rc;
+
video->vclk = devm_clk_get(dev, "vclk");
if (IS_ERR(video->vclk)) {
dev_err(dev, "Unable to get VCLK\n");
- return PTR_ERR(video->vclk);
+ rc = PTR_ERR(video->vclk);
+ goto err_unprepare_eclk;
}
+ rc = clk_prepare(video->vclk);
+ if (rc)
+ goto err_unprepare_eclk;
+
of_reserved_mem_device_init(dev);
rc = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
if (rc) {
dev_err(dev, "Failed to set DMA mask\n");
- of_reserved_mem_device_release(dev);
- return rc;
+ goto err_release_reserved_mem;
}
if (!aspeed_video_alloc_buf(video, &video->jpeg,
VE_JPEG_HEADER_SIZE)) {
dev_err(dev, "Failed to allocate DMA for JPEG header\n");
- of_reserved_mem_device_release(dev);
- return rc;
+ goto err_release_reserved_mem;
}
aspeed_video_init_jpeg_table(video->jpeg.virt, video->yuv420);
return 0;
+
+err_release_reserved_mem:
+ of_reserved_mem_device_release(dev);
+ clk_unprepare(video->vclk);
+err_unprepare_eclk:
+ clk_unprepare(video->eclk);
+
+ return rc;
}
static int aspeed_video_probe(struct platform_device *pdev)
@@ -1681,6 +1696,11 @@ static int aspeed_video_remove(struct platform_device *pdev)
struct v4l2_device *v4l2_dev = dev_get_drvdata(dev);
struct aspeed_video *video = to_aspeed_video(v4l2_dev);
+ aspeed_video_off(video);
+
+ clk_unprepare(video->vclk);
+ clk_unprepare(video->eclk);
+
video_unregister_device(&video->vdev);
vb2_queue_release(&video->queue);
--
2.21.0
^ permalink raw reply related
* [PATCH v2 01/11] media: aspeed: fix a kernel warning on clk control
From: Jae Hyun Yoo @ 2019-05-24 23:17 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190524231725.12320-1-jae.hyun.yoo@linux.intel.com>
Video engine clock control can be double disabled and eventually
it causes a kernel warning with stack dump printing out like below:
[ 515.540498] ------------[ cut here ]------------
[ 515.545174] WARNING: CPU: 0 PID: 1310 at drivers/clk/clk.c:684 clk_core_unprepare+0x13c/0x170
[ 515.553806] vclk-gate already unprepared
[ 515.557841] CPU: 0 PID: 1310 Comm: obmc-ikvm Tainted: G W 5.0.6-df66fbc97853fbba90a0bfa44de32f3d5f7602b4 #1
[ 515.568973] Hardware name: Generic DT based system
[ 515.573777] Backtrace:
[ 515.576272] [<80107cdc>] (dump_backtrace) from [<80107f10>] (show_stack+0x20/0x24)
[ 515.583930] r7:803a5614 r6:00000009 r5:00000000 r4:9d88fe1c
[ 515.589712] [<80107ef0>] (show_stack) from [<80690184>] (dump_stack+0x20/0x28)
[ 515.597053] [<80690164>] (dump_stack) from [<80116044>] (__warn.part.3+0xb4/0xdc)
[ 515.604557] [<80115f90>] (__warn.part.3) from [<801160d8>] (warn_slowpath_fmt+0x6c/0x90)
[ 515.612734] r6:000002ac r5:8080befc r4:80a07008
[ 515.617463] [<80116070>] (warn_slowpath_fmt) from [<803a5614>] (clk_core_unprepare+0x13c/0x170)
[ 515.626167] r3:8080cdf4 r2:8080bfc0
[ 515.629834] r7:98d682a8 r6:9d8a9200 r5:9e5151a0 r4:97abd620
[ 515.635530] [<803a54d8>] (clk_core_unprepare) from [<803a76a4>] (clk_unprepare+0x34/0x3c)
[ 515.643812] r5:9e5151a0 r4:97abd620
[ 515.647529] [<803a7670>] (clk_unprepare) from [<804f36ec>] (aspeed_video_off+0x38/0x50)
[ 515.655539] r5:9e5151a0 r4:9e504000
[ 515.659242] [<804f36b4>] (aspeed_video_off) from [<804f4358>] (aspeed_video_release+0x90/0x114)
[ 515.668036] r5:9e5044b0 r4:9e504000
[ 515.671643] [<804f42c8>] (aspeed_video_release) from [<804d302c>] (v4l2_release+0xd4/0xe8)
[ 515.679999] r7:98d682a8 r6:9d087810 r5:9d8a9200 r4:9e504318
[ 515.685695] [<804d2f58>] (v4l2_release) from [<80236454>] (__fput+0x98/0x1c4)
[ 515.692914] r5:9e51b608 r4:9d8a9200
[ 515.696597] [<802363bc>] (__fput) from [<802365e8>] (____fput+0x18/0x1c)
[ 515.703315] r9:80a0700c r8:801011e4 r7:00000000 r6:80a64b9c r5:9d8e35a0 r4:9d8e38dc
[ 515.711167] [<802365d0>] (____fput) from [<80131ca4>] (task_work_run+0x7c/0xa0)
[ 515.718596] [<80131c28>] (task_work_run) from [<80106884>] (do_work_pending+0x4a8/0x578)
[ 515.726777] r7:801011e4 r6:80a07008 r5:9d88ffb0 r4:ffffe000
[ 515.732466] [<801063dc>] (do_work_pending) from [<8010106c>] (slow_work_pending+0xc/0x20)
[ 515.740727] Exception stack(0x9d88ffb0 to 0x9d88fff8)
[ 515.745840] ffa0: 00000000 76f18094 00000000 00000000
[ 515.754122] ffc0: 00000007 00176778 7eda4c20 00000006 00000000 00000000 48e20fa4 00000000
[ 515.762386] ffe0: 00000002 7eda4b08 00000000 48f91efc 80000010 00000007
[ 515.769097] r10:00000000 r9:9d88e000 r8:801011e4 r7:00000006 r6:7eda4c20 r5:00176778
[ 515.777006] r4:00000007
[ 515.779558] ---[ end trace 12c04aadef8afbbb ]---
[ 515.784176] ------------[ cut here ]------------
[ 515.788817] WARNING: CPU: 0 PID: 1310 at drivers/clk/clk.c:825 clk_core_disable+0x18c/0x204
[ 515.797161] eclk-gate already disabled
[ 515.800916] CPU: 0 PID: 1310 Comm: obmc-ikvm Tainted: G W 5.0.6-df66fbc97853fbba90a0bfa44de32f3d5f7602b4 #1
[ 515.811945] Hardware name: Generic DT based system
[ 515.816730] Backtrace:
[ 515.819210] [<80107cdc>] (dump_backtrace) from [<80107f10>] (show_stack+0x20/0x24)
[ 515.826782] r7:803a5900 r6:00000009 r5:00000000 r4:9d88fe04
[ 515.832454] [<80107ef0>] (show_stack) from [<80690184>] (dump_stack+0x20/0x28)
[ 515.839687] [<80690164>] (dump_stack) from [<80116044>] (__warn.part.3+0xb4/0xdc)
[ 515.847170] [<80115f90>] (__warn.part.3) from [<801160d8>] (warn_slowpath_fmt+0x6c/0x90)
[ 515.855247] r6:00000339 r5:8080befc r4:80a07008
[ 515.859868] [<80116070>] (warn_slowpath_fmt) from [<803a5900>] (clk_core_disable+0x18c/0x204)
[ 515.868385] r3:8080cdd0 r2:8080c00c
[ 515.871957] r7:98d682a8 r6:9d8a9200 r5:97abd560 r4:97abd560
[ 515.877615] [<803a5774>] (clk_core_disable) from [<803a59a0>] (clk_core_disable_lock+0x28/0x34)
[ 515.886301] r7:98d682a8 r6:9d8a9200 r5:97abd560 r4:a0000013
[ 515.891960] [<803a5978>] (clk_core_disable_lock) from [<803a7714>] (clk_disable+0x2c/0x30)
[ 515.900216] r5:9e5151a0 r4:9e515f60
[ 515.903816] [<803a76e8>] (clk_disable) from [<804f36f8>] (aspeed_video_off+0x44/0x50)
[ 515.911656] [<804f36b4>] (aspeed_video_off) from [<804f4358>] (aspeed_video_release+0x90/0x114)
[ 515.920341] r5:9e5044b0 r4:9e504000
[ 515.923921] [<804f42c8>] (aspeed_video_release) from [<804d302c>] (v4l2_release+0xd4/0xe8)
[ 515.932184] r7:98d682a8 r6:9d087810 r5:9d8a9200 r4:9e504318
[ 515.937851] [<804d2f58>] (v4l2_release) from [<80236454>] (__fput+0x98/0x1c4)
[ 515.944980] r5:9e51b608 r4:9d8a9200
[ 515.948559] [<802363bc>] (__fput) from [<802365e8>] (____fput+0x18/0x1c)
[ 515.955257] r9:80a0700c r8:801011e4 r7:00000000 r6:80a64b9c r5:9d8e35a0 r4:9d8e38dc
[ 515.963008] [<802365d0>] (____fput) from [<80131ca4>] (task_work_run+0x7c/0xa0)
[ 515.970333] [<80131c28>] (task_work_run) from [<80106884>] (do_work_pending+0x4a8/0x578)
[ 515.978421] r7:801011e4 r6:80a07008 r5:9d88ffb0 r4:ffffe000
[ 515.984086] [<801063dc>] (do_work_pending) from [<8010106c>] (slow_work_pending+0xc/0x20)
[ 515.992247] Exception stack(0x9d88ffb0 to 0x9d88fff8)
[ 515.997296] ffa0: 00000000 76f18094 00000000 00000000
[ 516.005473] ffc0: 00000007 00176778 7eda4c20 00000006 00000000 00000000 48e20fa4 00000000
[ 516.013642] ffe0: 00000002 7eda4b08 00000000 48f91efc 80000010 00000007
[ 516.020257] r10:00000000 r9:9d88e000 r8:801011e4 r7:00000006 r6:7eda4c20 r5:00176778
[ 516.028072] r4:00000007
[ 516.030606] ---[ end trace 12c04aadef8afbbc ]---
To prevent this issue, this commit adds clock status checking
logic into the Aspeed video engine driver.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
---
v1 -> v2:
Removed spinlock handling code. Actual fix for removing the kernel warning is
blocking double disabling of video clocks. Refactoring of protection mechanism
of this driver will be submitted using a seprate patch series.
drivers/media/platform/aspeed-video.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index 8144fe36ad48..562d7c0adc78 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -187,6 +187,7 @@ enum {
VIDEO_STREAMING,
VIDEO_FRAME_INPRG,
VIDEO_STOPPED,
+ VIDEO_CLOCKS_ON,
};
struct aspeed_video_addr {
@@ -483,19 +484,29 @@ static void aspeed_video_enable_mode_detect(struct aspeed_video *video)
static void aspeed_video_off(struct aspeed_video *video)
{
+ if (!test_bit(VIDEO_CLOCKS_ON, &video->flags))
+ return;
+
/* Disable interrupts */
aspeed_video_write(video, VE_INTERRUPT_CTRL, 0);
/* Turn off the relevant clocks */
clk_disable_unprepare(video->vclk);
clk_disable_unprepare(video->eclk);
+
+ clear_bit(VIDEO_CLOCKS_ON, &video->flags);
}
static void aspeed_video_on(struct aspeed_video *video)
{
+ if (test_bit(VIDEO_CLOCKS_ON, &video->flags))
+ return;
+
/* Turn on the relevant clocks */
clk_prepare_enable(video->eclk);
clk_prepare_enable(video->vclk);
+
+ set_bit(VIDEO_CLOCKS_ON, &video->flags);
}
static void aspeed_video_bufs_done(struct aspeed_video *video,
--
2.21.0
^ permalink raw reply related
* [PATCH v2 00/11] Improve stability and add bug fixes of Aspeed video engine driver
From: Jae Hyun Yoo @ 2019-05-24 23:17 UTC (permalink / raw)
To: linux-aspeed
This patch series improves stability of Aspeed video engine driver by fixing
clock control and irq handling logic in the driver. Also, it adds a couple of
bug fixes and a workaroud for a silicon bug.
Changes since v1:
- Removed spinlock handling code from 0001 patch.
- Added 4 more patches.
Jae Hyun Yoo (11):
media: aspeed: fix a kernel warning on clk control
media: aspeed: refine clock control logic
media: aspeed: change irq to threaded irq
media: aspeed: remove IRQF_SHARED flag
media: aspeed: reduce noisy log printing outs
media: aspeed: remove checking of VE_INTERRUPT_CAPTURE_COMPLETE
media: aspeed: refine interrupt handling logic
media: aspeed: remove source buffer allocation before mode detection
media: aspeed: use different delays for triggering VE H/W reset
media: aspeed: fix an incorrect timeout checking in mode detection
media: aspeed: add a workaround to fix a silicon bug
drivers/media/platform/aspeed-video.c | 140 +++++++++++++++-----------
1 file changed, 80 insertions(+), 60 deletions(-)
--
2.21.0
^ permalink raw reply
* [PATCH v2 2/7] drivers/soc: Add Aspeed XDMA Engine Driver
From: Eddie James @ 2019-05-24 16:08 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <CAK8P3a2HSOsw33VhAk4Z8ARiYn4jG68Ec7fynKbrFWUNDo37Wg@mail.gmail.com>
On 5/21/19 7:02 AM, Arnd Bergmann wrote:
> On Mon, May 20, 2019 at 10:19 PM Eddie James <eajames@linux.ibm.com> wrote:
>> diff --git a/include/uapi/linux/aspeed-xdma.h b/include/uapi/linux/aspeed-xdma.h
>> new file mode 100644
>> index 0000000..2a4bd13
>> --- /dev/null
>> +++ b/include/uapi/linux/aspeed-xdma.h
>> @@ -0,0 +1,26 @@
>> +/* SPDX-License-Identifier: GPL-2.0+ */
>> +/* Copyright IBM Corp 2019 */
>> +
>> +#ifndef _UAPI_LINUX_ASPEED_XDMA_H_
>> +#define _UAPI_LINUX_ASPEED_XDMA_H_
>> +
>> +#include <linux/types.h>
>> +
>> +/*
>> + * aspeed_xdma_op
>> + *
>> + * upstream: boolean indicating the direction of the DMA operation; upstream
>> + * means a transfer from the BMC to the host
>> + *
>> + * host_addr: the DMA address on the host side, typically configured by PCI
>> + * subsystem
>> + *
>> + * len: the size of the transfer in bytes; it should be a multiple of 16 bytes
>> + */
>> +struct aspeed_xdma_op {
>> + __u32 upstream;
>> + __u64 host_addr;
>> + __u32 len;
>> +};
>> +
>> +#endif /* _UAPI_LINUX_ASPEED_XDMA_H_ */
> If this is a user space interface, please remove the holes in the
> data structure.
Surely it's 4-byte aligned and there won't be holes??
>
> I don't see how this is actually used in this patch, maybe you meant
> the definition to be part of another patch?
The structure is used in this patch as an argument to aspeed_xdma_start().
Thanks,
Eddie
>
> Arnd
>
^ permalink raw reply
* [PATCH v2] misc: aspeed-lpc-ctrl: Correct return values
From: Greg Kroah-Hartman @ 2019-05-24 15:59 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190503181336.579877-1-vijaykhemka@fb.com>
On Fri, May 03, 2019 at 11:13:36AM -0700, Vijay Khemka wrote:
> Corrected some of return values with appropriate meanings and reported
> relevant messages as debug information.
>
> Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
> ---
> drivers/misc/aspeed-lpc-ctrl.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
File is no longer here :(
^ permalink raw reply
* [PATCH] misc: aspeed-lpc-ctrl: make parameter optional
From: Greg Kroah-Hartman @ 2019-05-24 15:59 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190501223411.1655854-1-vijaykhemka@fb.com>
On Wed, May 01, 2019 at 03:34:11PM -0700, Vijay Khemka wrote:
> Makiing memory-region and flash as optional parameter in device
> tree if user needs to use these parameter through ioctl then
> need to define in devicetree.
>
> Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
> ---
> drivers/misc/aspeed-lpc-ctrl.c | 58 +++++++++++++++++++++-------------
> 1 file changed, 36 insertions(+), 22 deletions(-)
File is no longer at this location :(
^ permalink raw reply
* Re: [PATCH v2] ARM: dts: aspeed: Add Power9 and Power9 CFAM description
From: Andrew Jeffery @ 2019-05-24 3:41 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20190404044344.4592-1-joel@jms.id.au>
On Thu, 4 Apr 2019, at 15:14, Joel Stanley wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> To be used by the OpenPower BMC machines.
>
> This provides proper chip IDs but also adds the various sub-devices
> necessary for the future OCC driver among other. All the added nodes
> comply with the existing upstream FSI bindings.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> v2: The first version of this used a bit more magic and was nak'd by
> Olof. I've reworked it to not use macros. It still needs to be included
> in the parent device tree after the fsi node is created.
>
> arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts | 2 +
> arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 22 ++
> arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 8 +
> .../boot/dts/aspeed-bmc-opp-witherspoon.dts | 2 +
> arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 2 +
> arch/arm/boot/dts/ibm-power9-dual.dtsi | 248 ++++++++++++++++++
> 6 files changed, 284 insertions(+)
> create mode 100644 arch/arm/boot/dts/ibm-power9-dual.dtsi
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
> b/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
> index 024e52a6cd0f..de95112e2a04 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
> @@ -322,3 +322,5 @@
> &adc {
> status = "okay";
> };
> +
> +#include "ibm-power9-dual.dtsi"
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
> b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
> index b249da80fb83..b0cb34ccb135 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
> @@ -347,3 +347,25 @@
> line-name = "BMC_TPM_INT_N";
> };
> };
> +
> +&fsi {
> + cfam at 0,0 {
> + reg = <0 0>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + chip-id = <0>;
> +
> + scom at 1000 {
> + compatible = "ibm,fsi2pib";
> + reg = <0x1000 0x400>;
> + };
> +
> + fsi_hub0: hub at 3400 {
> + compatible = "ibm,fsi-master-hub";
> + reg = <0x3400 0x400>;
> + #address-cells = <2>;
> + #size-cells = <0>;
> + no-scan-on-init;
> + };
> + };
> +};
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> index 76fe994f2ba4..5a6bbb3b6640 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> @@ -296,3 +296,11 @@
> &adc {
> status = "okay";
> };
> +
> +&gfx {
> + status = "okay";
> + memory-region = <&gfx_memory>;
> +};
> +
> +#include "ibm-power9-dual.dtsi"
> +
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> index ad54117c075e..a0a4a0c6bc2a 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> @@ -592,3 +592,5 @@
> &adc {
> status = "okay";
> };
> +
> +#include "ibm-power9-dual.dtsi"
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> index 2c5aa90a546d..05df11cacb21 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> @@ -435,3 +435,5 @@
> &ibt {
> status = "okay";
> };
> +
> +#include "ibm-power9-dual.dtsi"
> diff --git a/arch/arm/boot/dts/ibm-power9-dual.dtsi
> b/arch/arm/boot/dts/ibm-power9-dual.dtsi
> new file mode 100644
> index 000000000000..2abc42eda7b0
> --- /dev/null
> +++ b/arch/arm/boot/dts/ibm-power9-dual.dtsi
> @@ -0,0 +1,248 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +// Copyright 2018 IBM Corp
> +
> +&fsi {
> + cfam at 0,0 {
> + reg = <0 0>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + chip-id = <0>;
> +
> + scom at 1000 {
> + compatible = "ibm,fsi2pib";
> + reg = <0x1000 0x400>;
> + };
> +
> + i2c at 1800 {
> + compatible = "ibm,fsi-i2c-master";
> + reg = <0x1800 0x400>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + cfam0_i2c0: i2c-bus at 0 {
> + reg = <0>;
> + };
> +
> + cfam0_i2c1: i2c-bus at 1 {
> + reg = <1>;
> + };
> +
> + cfam0_i2c2: i2c-bus at 2 {
> + reg = <2>;
> + };
> +
> + cfam0_i2c3: i2c-bus at 3 {
> + reg = <3>;
> + };
> +
> + cfam0_i2c4: i2c-bus at 4 {
> + reg = <4>;
> + };
> +
> + cfam0_i2c5: i2c-bus at 5 {
> + reg = <5>;
> + };
> +
> + cfam0_i2c6: i2c-bus at 6 {
> + reg = <6>;
> + };
> +
> + cfam0_i2c7: i2c-bus at 7 {
> + reg = <7>;
> + };
> +
> + cfam0_i2c8: i2c-bus at 8 {
> + reg = <8>;
> + };
> +
> + cfam0_i2c9: i2c-bus at 9 {
> + reg = <9>;
> + };
> +
> + cfam0_i2c10: i2c-bus at a {
> + reg = <10>;
> + };
> +
> + cfam0_i2c11: i2c-bus at b {
> + reg = <11>;
> + };
> +
> + cfam0_i2c12: i2c-bus at c {
> + reg = <12>;
> + };
> +
> + cfam0_i2c13: i2c-bus at d {
> + reg = <13>;
> + };
> +
> + cfam0_i2c14: i2c-bus at e {
> + reg = <14>;
> + };
> + };
> +
> + sbefifo at 2400 {
> + compatible = "ibm,p9-sbefifo";
> + reg = <0x2400 0x400>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + fsi_occ0: occ {
> + compatible = "ibm,p9-occ";
> + };
> + };
> +
> + fsi_hub0: hub at 3400 {
> + compatible = "fsi-master-hub";
> + reg = <0x3400 0x400>;
> + #address-cells = <2>;
> + #size-cells = <0>;
> +
> + no-scan-on-init;
> + };
> + };
> +};
> +
> +&fsi_hub0 {
> + cfam at 1,0 {
> + reg = <1 0>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + chip-id = <1>;
> +
> + scom at 1000 {
> + compatible = "ibm,fsi2pib";
> + reg = <0x1000 0x400>;
> + };
> +
> + i2c at 1800 {
> + compatible = "ibm,fsi-i2c-master";
> + reg = <0x1800 0x400>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + cfam1_i2c0: i2c-bus at 0 {
> + reg = <0>;
> + };
> +
> + cfam1_i2c1: i2c-bus at 1 {
> + reg = <1>;
> + };
> +
> + cfam1_i2c2: i2c-bus at 2 {
> + reg = <2>;
> + };
> +
> + cfam1_i2c3: i2c-bus at 3 {
> + reg = <3>;
> + };
> +
> + cfam1_i2c4: i2c-bus at 4 {
> + reg = <4>;
> + };
> +
> + cfam1_i2c5: i2c-bus at 5 {
> + reg = <5>;
> + };
> +
> + cfam1_i2c6: i2c-bus at 6 {
> + reg = <6>;
> + };
> +
> + cfam1_i2c7: i2c-bus at 7 {
> + reg = <7>;
> + };
> +
> + cfam1_i2c8: i2c-bus at 8 {
> + reg = <8>;
> + };
> +
> + cfam1_i2c9: i2c-bus at 9 {
> + reg = <9>;
> + };
> +
> + cfam1_i2c10: i2c-bus at a {
> + reg = <10>;
> + };
> +
> + cfam1_i2c11: i2c-bus at b {
> + reg = <11>;
> + };
> +
> + cfam1_i2c12: i2c-bus at c {
> + reg = <12>;
> + };
> +
> + cfam1_i2c13: i2c-bus at d {
> + reg = <13>;
> + };
> +
> + cfam1_i2c14: i2c-bus at e {
> + reg = <14>;
> + };
> + };
> +
> + sbefifo at 2400 {
> + compatible = "ibm,p9-sbefifo";
> + reg = <0x2400 0x400>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + fsi_occ1: occ {
> + compatible = "ibm,p9-occ";
> + };
> + };
> +
> + fsi_hub1: hub at 3400 {
> + compatible = "fsi-master-hub";
> + reg = <0x3400 0x400>;
> + #address-cells = <2>;
> + #size-cells = <0>;
> +
> + no-scan-on-init;
> + };
> + };
> +};
> +
> +/* Legacy OCC numbering (to get rid of when userspace is fixed) */
> +&fsi_occ0 {
> + reg = <1>;
> +};
> +
> +&fsi_occ1 {
> + reg = <2>;
> +};
> +
> +/ {
> + aliases {
> + i2c100 = &cfam0_i2c0;
> + i2c101 = &cfam0_i2c1;
> + i2c102 = &cfam0_i2c2;
> + i2c103 = &cfam0_i2c3;
> + i2c104 = &cfam0_i2c4;
> + i2c105 = &cfam0_i2c5;
> + i2c106 = &cfam0_i2c6;
> + i2c107 = &cfam0_i2c7;
> + i2c108 = &cfam0_i2c8;
> + i2c109 = &cfam0_i2c9;
> + i2c110 = &cfam0_i2c10;
> + i2c111 = &cfam0_i2c11;
> + i2c112 = &cfam0_i2c12;
> + i2c113 = &cfam0_i2c13;
> + i2c114 = &cfam0_i2c14;
> + i2c200 = &cfam1_i2c0;
> + i2c201 = &cfam1_i2c1;
> + i2c202 = &cfam1_i2c2;
> + i2c203 = &cfam1_i2c3;
> + i2c204 = &cfam1_i2c4;
> + i2c205 = &cfam1_i2c5;
> + i2c206 = &cfam1_i2c6;
> + i2c207 = &cfam1_i2c7;
> + i2c208 = &cfam1_i2c8;
> + i2c209 = &cfam1_i2c9;
> + i2c210 = &cfam1_i2c10;
> + i2c211 = &cfam1_i2c11;
> + i2c212 = &cfam1_i2c12;
> + i2c213 = &cfam1_i2c13;
> + i2c214 = &cfam1_i2c14;
> + };
> +};
> --
> 2.20.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply
* [PATCH dev-5.1] ARM: dts: aspeed: swift: Add pca9539 devices
From: Joel Stanley @ 2019-05-22 6:28 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <CAK_vbW1fodzoYBAtqFg9w3i+kK5W3Yt4GczxukSfMHN80rku9Q@mail.gmail.com>
On Wed, 22 May 2019 at 00:25, Brandon Wyman <bjwyman@gmail.com> wrote:
>
> On Tue, May 21, 2019 at 7:23 PM Brandon Wyman <bjwyman@gmail.com> wrote:
> >
> > On Mon, May 20, 2019 at 3:17 PM Adriana Kobylak <anoo@linux.ibm.com> wrote:
> > >
> > > From: Adriana Kobylak <anoo@us.ibm.com>
> > >
> > > Add the pca9539 devices to the Swift device tree.
> > >
> > > Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
>
> Reviewed-by: Brandon Wyman <bjwyman@gmail.com>
Thanks, merged into dev-5.1.
^ permalink raw reply
* [PATCH dev-5.1] ARM: dts: aspeed: swift: Add pca9539 devices
From: Brandon Wyman @ 2019-05-22 0:25 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <CAK_vbW2474g00xqoNU-Qd5DJ31mk5vcQvcr1GKxL8mGZ-Dqxfw@mail.gmail.com>
On Tue, May 21, 2019 at 7:23 PM Brandon Wyman <bjwyman@gmail.com> wrote:
>
> On Mon, May 20, 2019 at 3:17 PM Adriana Kobylak <anoo@linux.ibm.com> wrote:
> >
> > From: Adriana Kobylak <anoo@us.ibm.com>
> >
> > Add the pca9539 devices to the Swift device tree.
> >
> > Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Reviewed-by: Brandon Wyman <bjwyman@gmail.com>
> > ---
> > arch/arm/boot/dts/aspeed-bmc-opp-swift.dts | 146 +++++++++++++++++++++++++++++
> > 1 file changed, 146 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts b/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts
> > index 9610637..270c923 100644
> > --- a/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts
> > +++ b/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts
> > @@ -732,6 +732,79 @@
> > compatible = "infineon,ir35221";
> > reg = <0x72>;
> > };
> > +
> > + pca2: pca9539 at 74 {
> > + compatible = "nxp,pca9539";
> > + reg = <0x74>;
>
> This looks like the right bus, address, and chip/compatible type, but
> what follows after I am not 100% certain on. I do not know the
> specifics of how to indicate these are input GPIO pins.
>
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + gpio-controller;
> > + #gpio-cells = <2>;
> > +
> > + gpio at 0 {
> > + reg = <0>;
> > + };
> > +
> > + gpio at 1 {
> > + reg = <1>;
> > + };
> > +
> > + gpio at 2 {
> > + reg = <2>;
> > + };
> > +
> > + gpio at 3 {
> > + reg = <3>;
> > + };
> > +
> > + gpio at 4 {
> > + reg = <4>;
> > + };
> > +
> > + gpio at 5 {
> > + reg = <5>;
> > + };
> > +
> > + gpio at 6 {
> > + reg = <6>;
> > + };
> > +
> > + gpio at 7 {
> > + reg = <7>;
> > + };
> > +
> > + gpio at 8 {
> > + reg = <8>;
> > + };
> > +
> > + gpio at 9 {
> > + reg = <9>;
> > + };
> > +
> > + gpio at 10 {
> > + reg = <10>;
> > + };
> > +
> > + gpio at 11 {
> > + reg = <11>;
> > + };
> > +
> > + gpio at 12 {
> > + reg = <12>;
> > + };
> > +
> > + gpio at 13 {
> > + reg = <13>;
> > + };
> > +
> > + gpio at 14 {
> > + reg = <14>;
> > + };
> > +
> > + gpio at 15 {
> > + reg = <15>;
> > + };
> > + };
> > };
> >
> > &i2c10 {
> > @@ -756,6 +829,79 @@
> > compatible = "infineon,ir35221";
> > reg = <0x72>;
> > };
> > +
> > + pca3: pca9539 at 74 {
> > + compatible = "nxp,pca9539";
> > + reg = <0x74>;
>
> This looks like the correct bus, address, and type as well, but again,
> not sure on how to make sure they are GPIO input pins.
>
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + gpio-controller;
> > + #gpio-cells = <2>;
> > +
> > + gpio at 0 {
> > + reg = <0>;
> > + };
> > +
> > + gpio at 1 {
> > + reg = <1>;
> > + };
> > +
> > + gpio at 2 {
> > + reg = <2>;
> > + };
> > +
> > + gpio at 3 {
> > + reg = <3>;
> > + };
> > +
> > + gpio at 4 {
> > + reg = <4>;
> > + };
> > +
> > + gpio at 5 {
> > + reg = <5>;
> > + };
> > +
> > + gpio at 6 {
> > + reg = <6>;
> > + };
> > +
> > + gpio at 7 {
> > + reg = <7>;
> > + };
> > +
> > + gpio at 8 {
> > + reg = <8>;
> > + };
> > +
> > + gpio at 9 {
> > + reg = <9>;
> > + };
> > +
> > + gpio at 10 {
> > + reg = <10>;
> > + };
> > +
> > + gpio at 11 {
> > + reg = <11>;
> > + };
> > +
> > + gpio at 12 {
> > + reg = <12>;
> > + };
> > +
> > + gpio at 13 {
> > + reg = <13>;
> > + };
> > +
> > + gpio at 14 {
> > + reg = <14>;
> > + };
> > +
> > + gpio at 15 {
> > + reg = <15>;
> > + };
> > + };
> > };
> >
> > &i2c11 {
> > --
> > 1.8.3.1
> >
^ permalink raw reply
* [PATCH dev-5.1] ARM: dts: aspeed: swift: Add pca9539 devices
From: Brandon Wyman @ 2019-05-22 0:23 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <1558383435-38811-1-git-send-email-anoo@linux.ibm.com>
On Mon, May 20, 2019 at 3:17 PM Adriana Kobylak <anoo@linux.ibm.com> wrote:
>
> From: Adriana Kobylak <anoo@us.ibm.com>
>
> Add the pca9539 devices to the Swift device tree.
>
> Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
> ---
> arch/arm/boot/dts/aspeed-bmc-opp-swift.dts | 146 +++++++++++++++++++++++++++++
> 1 file changed, 146 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts b/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts
> index 9610637..270c923 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts
> @@ -732,6 +732,79 @@
> compatible = "infineon,ir35221";
> reg = <0x72>;
> };
> +
> + pca2: pca9539 at 74 {
> + compatible = "nxp,pca9539";
> + reg = <0x74>;
This looks like the right bus, address, and chip/compatible type, but
what follows after I am not 100% certain on. I do not know the
specifics of how to indicate these are input GPIO pins.
> + #address-cells = <1>;
> + #size-cells = <0>;
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + gpio at 0 {
> + reg = <0>;
> + };
> +
> + gpio at 1 {
> + reg = <1>;
> + };
> +
> + gpio at 2 {
> + reg = <2>;
> + };
> +
> + gpio at 3 {
> + reg = <3>;
> + };
> +
> + gpio at 4 {
> + reg = <4>;
> + };
> +
> + gpio at 5 {
> + reg = <5>;
> + };
> +
> + gpio at 6 {
> + reg = <6>;
> + };
> +
> + gpio at 7 {
> + reg = <7>;
> + };
> +
> + gpio at 8 {
> + reg = <8>;
> + };
> +
> + gpio at 9 {
> + reg = <9>;
> + };
> +
> + gpio at 10 {
> + reg = <10>;
> + };
> +
> + gpio at 11 {
> + reg = <11>;
> + };
> +
> + gpio at 12 {
> + reg = <12>;
> + };
> +
> + gpio at 13 {
> + reg = <13>;
> + };
> +
> + gpio at 14 {
> + reg = <14>;
> + };
> +
> + gpio at 15 {
> + reg = <15>;
> + };
> + };
> };
>
> &i2c10 {
> @@ -756,6 +829,79 @@
> compatible = "infineon,ir35221";
> reg = <0x72>;
> };
> +
> + pca3: pca9539 at 74 {
> + compatible = "nxp,pca9539";
> + reg = <0x74>;
This looks like the correct bus, address, and type as well, but again,
not sure on how to make sure they are GPIO input pins.
> + #address-cells = <1>;
> + #size-cells = <0>;
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + gpio at 0 {
> + reg = <0>;
> + };
> +
> + gpio at 1 {
> + reg = <1>;
> + };
> +
> + gpio at 2 {
> + reg = <2>;
> + };
> +
> + gpio at 3 {
> + reg = <3>;
> + };
> +
> + gpio at 4 {
> + reg = <4>;
> + };
> +
> + gpio at 5 {
> + reg = <5>;
> + };
> +
> + gpio at 6 {
> + reg = <6>;
> + };
> +
> + gpio at 7 {
> + reg = <7>;
> + };
> +
> + gpio at 8 {
> + reg = <8>;
> + };
> +
> + gpio at 9 {
> + reg = <9>;
> + };
> +
> + gpio at 10 {
> + reg = <10>;
> + };
> +
> + gpio at 11 {
> + reg = <11>;
> + };
> +
> + gpio at 12 {
> + reg = <12>;
> + };
> +
> + gpio at 13 {
> + reg = <13>;
> + };
> +
> + gpio at 14 {
> + reg = <14>;
> + };
> +
> + gpio at 15 {
> + reg = <15>;
> + };
> + };
> };
>
> &i2c11 {
> --
> 1.8.3.1
>
^ permalink raw reply
* [PATCH v2 4/7] drivers/soc: xdma: Add PCI device configuration sysfs
From: Arnd Bergmann @ 2019-05-21 12:06 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <1558383565-11821-5-git-send-email-eajames@linux.ibm.com>
On Mon, May 20, 2019 at 10:21 PM Eddie James <eajames@linux.ibm.com> wrote:
>
> The AST2500 has two PCI devices embedded. The XDMA engine can use either
> device to perform DMA transfers. Users need the capability to choose
> which device to use. This commit therefore adds two sysfs files that
> toggle the AST2500 and XDMA engine between the two PCI devices.
>
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> ---
> drivers/soc/aspeed/aspeed-xdma.c | 64 ++++++++++++++++++++++++++++++++++++++++
This patch needs to come with a corresponding file in Documentation/ABI/
Arnd
^ permalink raw reply
* [PATCH v2 2/7] drivers/soc: Add Aspeed XDMA Engine Driver
From: Arnd Bergmann @ 2019-05-21 12:02 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <1558383565-11821-3-git-send-email-eajames@linux.ibm.com>
On Mon, May 20, 2019 at 10:19 PM Eddie James <eajames@linux.ibm.com> wrote:
> diff --git a/include/uapi/linux/aspeed-xdma.h b/include/uapi/linux/aspeed-xdma.h
> new file mode 100644
> index 0000000..2a4bd13
> --- /dev/null
> +++ b/include/uapi/linux/aspeed-xdma.h
> @@ -0,0 +1,26 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/* Copyright IBM Corp 2019 */
> +
> +#ifndef _UAPI_LINUX_ASPEED_XDMA_H_
> +#define _UAPI_LINUX_ASPEED_XDMA_H_
> +
> +#include <linux/types.h>
> +
> +/*
> + * aspeed_xdma_op
> + *
> + * upstream: boolean indicating the direction of the DMA operation; upstream
> + * means a transfer from the BMC to the host
> + *
> + * host_addr: the DMA address on the host side, typically configured by PCI
> + * subsystem
> + *
> + * len: the size of the transfer in bytes; it should be a multiple of 16 bytes
> + */
> +struct aspeed_xdma_op {
> + __u32 upstream;
> + __u64 host_addr;
> + __u32 len;
> +};
> +
> +#endif /* _UAPI_LINUX_ASPEED_XDMA_H_ */
If this is a user space interface, please remove the holes in the
data structure.
I don't see how this is actually used in this patch, maybe you meant
the definition to be part of another patch?
Arnd
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox