Re: [PATCH 0/5] hw/arm/exynos4210: Add acceptance tests to the SMDKC210 board

2019-10-07 Thread Krzysztof Kozlowski
On Mon, Oct 07, 2019 at 11:10:24AM +0200, Krzysztof Kozlowski wrote: > On Sat, Oct 05, 2019 at 05:47:43PM +0200, Philippe Mathieu-Daudé wrote: > > Hi all, > > > > Yesterday Peter Maydell asked on IRC if I had any working Exynos4 > > image. I looked at some old ba

Re: [PATCH 0/5] hw/arm/exynos4210: Add acceptance tests to the SMDKC210 board

2019-10-07 Thread Krzysztof Kozlowski
On Sat, Oct 05, 2019 at 05:47:43PM +0200, Philippe Mathieu-Daudé wrote: > Hi all, > > Yesterday Peter Maydell asked on IRC if I had any working Exynos4 > image. I looked at some old backuped notes and could boot Guenter > initrd with BusyBox. > I'll use this cover letter to share my notes, they mi

Re: [PATCH 4/5] hw/arm/exynos4210: Use the Samsung s3c SDHCI controller

2019-10-07 Thread Krzysztof Kozlowski
26.032318] Synopsys Designware Multimedia Card Interface Driver > [ 42.024885] Waiting for root device /dev/mmcblk0... > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/arm/exynos4210.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [PATCH 3/5] hw/sd/sdhci: Add dummy Samsung SDHCI controller

2019-10-07 Thread Krzysztof Kozlowski
on the important registers missing. The CONTROL2 has also few other settings, not clock related, but they can be skipped as well. Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof > > [1] > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/m

Re: [Qemu-devel] [PATCH v8 16/17] hw/arm/exynos4210: implement SDHCI Spec v2

2018-01-21 Thread Krzysztof Kozlowski
> 1 file changed, 19 insertions(+), 2 deletions(-) > Acked-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [Qemu-devel] [PATCH v3] hw/misc: Add Exynos4210 Pseudo Random Number Generator

2017-06-20 Thread Krzysztof Kozlowski
On Tue, Jun 20, 2017 at 04:34:57PM +0100, Peter Maydell wrote: > On 25 April 2017 at 19:06, Krzysztof Kozlowski wrote: > > Add emulation for Exynos4210 Pseudo Random Number Generator which could > > work on fixed seeds or with seeds provided by True Random Number > > Gener

Re: [Qemu-devel] [PATCH v3] hw/misc: Add Exynos4210 Pseudo Random Number Generator

2017-06-13 Thread Krzysztof Kozlowski
On Tue, Jun 13, 2017 at 07:06:20PM +0100, Peter Maydell wrote: > On 25 April 2017 at 19:06, Krzysztof Kozlowski wrote: > > Add emulation for Exynos4210 Pseudo Random Number Generator which could > > work on fixed seeds or with seeds provided by True Random Number > > Gener

[Qemu-devel] [PATCH v4 9/9] hw/misc/exynos4210_pmu: Add support for system poweroff

2017-06-02 Thread Krzysztof Kozlowski
Linux kernel (v4.12-rc1) uses regmap cache for this access. When the register is kept at reset value, the kernel will not issue a write to it. Usually the bootloader sets the eight bit of PS_HOLD high so mimic its existence here. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell

[Qemu-devel] [PATCH v4 5/9] hw/arm/exynos: Move DRAM initialization next boards

2017-06-02 Thread Krzysztof Kozlowski
Before QOM-ifying the Exynos4 SoC model, move the DRAM initialization from exynos4210.c to exynos4_boards.c because DRAM is board specific, not SoC. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/exynos4210.c | 20 +- hw/arm

[Qemu-devel] [PATCH v4 6/9] hw/arm/exynos: Declare local variables in some order

2017-06-02 Thread Krzysztof Kozlowski
Bring some more readability by declaring local function variables: first initialized ones and then the rest (with reversed-christmas-tree order). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/exynos4210.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Qemu-devel] [PATCH v4 8/9] hw/intc/exynos4210_gic: Constify array of combiner interrupts

2017-06-02 Thread Krzysztof Kozlowski
The static array of interrupt combiner mappings is not modified so it can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé --- hw/intc/exynos4210_gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc

[Qemu-devel] [PATCH v4 2/9] hw/timer/exynos4210_mct: Fix checkpatch style errors

2017-06-02 Thread Krzysztof Kozlowski
Fix checkpatch errors: 1. ERROR: spaces required around that '+' (ctx:VxV) 2. ERROR: spaces required around that '&' (ctx:VxV) No functional changes. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/timer/exynos4210_mct.c | 4 ++-- 1 file cha

[Qemu-devel] [PATCH v4 4/9] hw/timer/exynos4210_mct: Remove unused defines

2017-06-02 Thread Krzysztof Kozlowski
Remove defines not used anywhere. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/timer/exynos4210_mct.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c index ea5f99d9a41b..e4ef4cfd3625 100644 --- a/hw/timer

[Qemu-devel] [PATCH v4 3/9] hw/timer/exynos4210_mct: Cleanup indentation and empty new lines

2017-06-02 Thread Krzysztof Kozlowski
Statements under 'case' were in some places wrongly indented bringing confusion and making the code less readable. Remove also few unneeded blank lines. No functional changes. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/timer/exynos4210_

[Qemu-devel] [PATCH v4 7/9] hw/arm/exynos: Use type define instead of hard-coded a9mpcore_priv string

2017-06-02 Thread Krzysztof Kozlowski
Use a define for a9mpcore_priv device type name instead of hard-coded string. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/exynos4210.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c index

[Qemu-devel] [PATCH v4 1/9] hw/intc/exynos4210_gic: Use more meaningful name for local variable

2017-06-02 Thread Krzysztof Kozlowski
e end, next to other uninitialized ones. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/intc/exynos4210_gic.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c index 2a55817b7660..62acede72f62

[Qemu-devel] [PATCH v4 0/9] hw: arm: exynos: Improvements and cleanups

2017-06-02 Thread Krzysztof Kozlowski
). Changes since v3: 1. Rebase on current master (API for shutdown changed). 2. Apply Peter's reviewed-by tag. Best regards, Krzysztof [1] https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg04821.html [2] https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg04818.html Krzy

Re: [Qemu-devel] [PATCH v3 00/11] hw: arm: exynos: Bring up secondary CPU, QOM-ify Soc, other improvements

2017-06-01 Thread Krzysztof Kozlowski
On Thu, Jun 01, 2017 at 07:10:19PM +0200, Krzysztof Kozlowski wrote: > On Thu, Jun 01, 2017 at 05:31:41PM +0100, Peter Maydell wrote: > > On 31 May 2017 at 09:58, Krzysztof Kozlowski wrote: > > > On Tue, May 30, 2017 at 2:04 PM, Peter Maydell > > > wrote: > > &g

Re: [Qemu-devel] [PATCH v3 00/11] hw: arm: exynos: Bring up secondary CPU, QOM-ify Soc, other improvements

2017-06-01 Thread Krzysztof Kozlowski
On Thu, Jun 01, 2017 at 05:31:41PM +0100, Peter Maydell wrote: > On 31 May 2017 at 09:58, Krzysztof Kozlowski wrote: > > On Tue, May 30, 2017 at 2:04 PM, Peter Maydell > > wrote: > >> So is this a regression compared to our current model? I was > >> under the im

Re: [Qemu-devel] [PATCH v3 00/11] hw: arm: exynos: Bring up secondary CPU, QOM-ify Soc, other improvements

2017-05-31 Thread Krzysztof Kozlowski
On Tue, May 30, 2017 at 2:04 PM, Peter Maydell wrote: > On 21 May 2017 at 16:29, Krzysztof Kozlowski wrote: >> This is a collection of three already sent patchsets [1] [2] [3]. >> >> >> Changes since previous versions (v2): >> 1. Patch 11/11: set BIT(8) in PS_HOL

Re: [Qemu-devel] [PATCH v2 0/3] hw/arm/exynos: QOM-ify the SoC

2017-05-31 Thread Krzysztof Kozlowski
On Tue, May 30, 2017 at 3:00 PM, Peter Maydell wrote: > On 30 May 2017 at 13:07, Peter Maydell wrote: >> On 7 May 2017 at 19:19, Krzysztof Kozlowski wrote: >>> Hi, >>> >>> Changes since v1: >>> = >>> 1. s/RAM/DRAM/ in commi

[Qemu-devel] [PATCH v3 06/11] hw/arm/exynos: Move DRAM initialization next boards

2017-05-21 Thread Krzysztof Kozlowski
Before QOM-ifying the Exynos4 SoC model, move the DRAM initialization from exynos4210.c to exynos4_boards.c because DRAM is board specific, not SoC. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/exynos4210.c | 20 +- hw/arm

[Qemu-devel] [PATCH v3 10/11] hw/intc/exynos4210_gic: Constify array of combiner interrupts

2017-05-21 Thread Krzysztof Kozlowski
The static array of interrupt combiner mappings is not modified so it can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé --- hw/intc/exynos4210_gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc

[Qemu-devel] [PATCH v3 04/11] hw/timer/exynos4210_mct: Cleanup indentation and empty new lines

2017-05-21 Thread Krzysztof Kozlowski
Statements under 'case' were in some places wrongly indented bringing confusion and making the code less readable. Remove also few unneeded blank lines. No functional changes. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/timer/exynos4210_

[Qemu-devel] [PATCH v3 09/11] hw/arm/exynos: Use type define instead of hard-coded a9mpcore_priv string

2017-05-21 Thread Krzysztof Kozlowski
Use a define for a9mpcore_priv device type name instead of hard-coded string. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/exynos4210.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c index

[Qemu-devel] [PATCH v3 03/11] hw/timer/exynos4210_mct: Fix checkpatch style errors

2017-05-21 Thread Krzysztof Kozlowski
Fix checkpatch errors: 1. ERROR: spaces required around that '+' (ctx:VxV) 2. ERROR: spaces required around that '&' (ctx:VxV) No functional changes. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/timer/exynos4210_mct.c | 4 ++-- 1 file cha

[Qemu-devel] [PATCH v3 11/11] hw/misc/exynos4210_pmu: Add support for system poweroff

2017-05-21 Thread Krzysztof Kozlowski
Linux kernel (v4.12-rc1) uses regmap cache for this access. When the register is kept at reset value, the kernel will not issue a write to it. Usually the bootloader sets the eight bit of PS_HOLD high so mimic its existence here. Signed-off-by: Krzysztof Kozlowski --- hw/misc/exynos4210_pmu.c

[Qemu-devel] [PATCH v3 05/11] hw/timer/exynos4210_mct: Remove unused defines

2017-05-21 Thread Krzysztof Kozlowski
Remove defines not used anywhere. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/timer/exynos4210_mct.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c index ea5f99d9a41b..e4ef4cfd3625 100644 --- a/hw/timer

[Qemu-devel] [PATCH v3 00/11] hw: arm: exynos: Bring up secondary CPU, QOM-ify Soc, other improvements

2017-05-21 Thread Krzysztof Kozlowski
-qom-soc-poweroff-v3 Best regards, Krzysztof [1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg436902.html [2] https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg01562.html [3] https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg01553.html Krzysztof Kozlowski (11): hw/intc

[Qemu-devel] [PATCH v3 08/11] hw/arm/exynos: QOM-ify the SoC

2017-05-21 Thread Krzysztof Kozlowski
Convert the Exynos4210 SoC code into a QOM model which is a preferred approach instead of directly initializing SoC-related devices from the board file. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/exynos4210.c | 18 +++--- hw/arm

[Qemu-devel] [PATCH v3 07/11] hw/arm/exynos: Declare local variables in some order

2017-05-21 Thread Krzysztof Kozlowski
Bring some more readability by declaring local function variables: first initialized ones and then the rest (with reversed-christmas-tree order). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/exynos4210.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Qemu-devel] [PATCH v3 02/11] hw/intc/exynos4210_gic: Use more meaningful name for local variable

2017-05-21 Thread Krzysztof Kozlowski
e end, next to other uninitialized ones. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/intc/exynos4210_gic.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c index 222cfd6c6387..9a2254f0b13c

[Qemu-devel] [PATCH v3 01/11] hw/intc/exynos4210_gic: Fix GIC memory mappings for secondary CPU

2017-05-21 Thread Krzysztof Kozlowski
ng) which are needed for example for IRQ work. Lack of IRQ work causes kernel to hang during system power off because cpufreq_dbs_governor_stop() waits for completion with irq_work_sync(). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/intc/exynos4210_gic.c | 21

Re: [Qemu-devel] [PATCH 3/3] hw/arm/exynos: Add support for system poweroff

2017-05-08 Thread Krzysztof Kozlowski
On Mon, May 08, 2017 at 09:21:40AM -0500, Eric Blake wrote: > On 05/07/2017 06:35 AM, Krzysztof Kozlowski wrote: > > On all Exynos-based boards, the system powers down itself by driving > > PS_HOLD signal low. Handle writing to respective PMU register to fix > &

[Qemu-devel] [PATCH v2 1/3] hw/arm/exynos: Move DRAM initialization next boards

2017-05-07 Thread Krzysztof Kozlowski
Before QOM-ifying the Exynos4 SoC model, move the DRAM initialization from exynos4210.c to exynos4_boards.c because DRAM is board specific, not SoC. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/exynos4210.c | 20 +- hw/arm

[Qemu-devel] [PATCH v2 2/3] hw/arm/exynos: Declare local variables in some order

2017-05-07 Thread Krzysztof Kozlowski
Bring some more readability by declaring local function variables: first initialized ones and then the rest (with reversed-christmas-tree order). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/exynos4210.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Qemu-devel] [PATCH v2 3/3] hw/arm/exynos: QOM-ify the SoC

2017-05-07 Thread Krzysztof Kozlowski
Convert the Exynos4210 SoC code into a QOM model which is a preferred approach instead of directly initializing SoC-related devices from the board file. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/exynos4210.c | 18 +++--- hw/arm

[Qemu-devel] [PATCH v2 0/3] hw/arm/exynos: QOM-ify the SoC

2017-05-07 Thread Krzysztof Kozlowski
Hi, Changes since v1: = 1. s/RAM/DRAM/ in commit msg of first patch (as suggested by Philippe). 2. Add Philippe's reviewed-by. Convert the Exynos4210 SoC driver into QOM model. No external dependencies, rebased on v2.9.0-363-g0de9191deb14. Best regards, Krzysztof Krzy

[Qemu-devel] [PATCH 0/3] hw/arm/exynos: Fix poweroff

2017-05-07 Thread Krzysztof Kozlowski
Hi, Beside two minor cleanups, the patchset implements proper Exynos power off. Still the GIC [1] fix is needed because the kernel will not reach power off handlers without it. [1] http://patchwork.ozlabs.org/patch/738320/ Best regards, Krzysztof Krzysztof Kozlowski (3): hw/arm/exynos: Use

[Qemu-devel] [PATCH 1/3] hw/arm/exynos: Use type define instead of hard-coded a9mpcore_priv string

2017-05-07 Thread Krzysztof Kozlowski
Use a define for a9mpcore_priv device type name instead of hard-coded string. Signed-off-by: Krzysztof Kozlowski --- hw/arm/exynos4210.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c index 034fc8be9d76..a9e221c5b7fe 100644 --- a

[Qemu-devel] [PATCH 2/3] hw/intc/exynos: Constify array of combiner interrupts

2017-05-07 Thread Krzysztof Kozlowski
The static array of interrupt combiner mappings is not modified so it can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski --- hw/intc/exynos4210_gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c

[Qemu-devel] [PATCH 3/3] hw/arm/exynos: Add support for system poweroff

2017-05-07 Thread Krzysztof Kozlowski
) from [] (panic+0xdc/0x268) [] (panic) from [] (do_exit+0xa90/0xab4) [] (do_exit) from [] (SyS_reboot+0x164/0x1d0) [] (SyS_reboot) from [] (ret_fast_syscall+0x0/0x3c) Signed-off-by: Krzysztof Kozlowski --- hw/misc/exynos4210_pmu.c | 14 ++ 1 file changed, 14 insertions

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 1/5] hw/intc/exynos4210_gic: Fix GIC memory mappings for secondary CPU

2017-05-07 Thread Krzysztof Kozlowski
On Mon, Mar 13, 2017 at 04:32:40PM -0300, Philippe Mathieu-Daudé wrote: > On 03/13/2017 03:04 PM, Krzysztof Kozlowski wrote: > > Recent Linux kernel (tested next-20170224) was complaining about missing > > GIC mask and was unable to bring up secondary CPU: > > > >

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/3] hw/arm/exynos: Move RAM initialization next boards

2017-05-06 Thread Krzysztof Kozlowski
On Sat, May 06, 2017 at 01:05:19PM -0300, Philippe Mathieu-Daudé wrote: > Hi Krzysztof, > > Please modify RAM -> DRAM in subject/description so there is no confusion > about also moving the IRAM (which is SoC specific). > > With this: > Reviewed-by: Philippe Mathieu-Daudé Sure, thanks for revie

[Qemu-devel] [PATCH 1/3] hw/arm/exynos: Move RAM initialization next boards

2017-05-06 Thread Krzysztof Kozlowski
Before QOM-ifying the Exynos4 SoC model, move the RAM initialization from exynos4210.c to exynos4_boards.c because RAM is board specific, not SoC. Signed-off-by: Krzysztof Kozlowski --- hw/arm/exynos4210.c | 20 +- hw/arm/exynos4_boards.c | 50

[Qemu-devel] [PATCH 3/3] hw/arm/exynos: QOM-ify the SoC

2017-05-06 Thread Krzysztof Kozlowski
Convert the Exynos4210 SoC code into a QOM model which is a preferred approach instead of directly initializing SoC-related devices from the board file. Signed-off-by: Krzysztof Kozlowski --- hw/arm/exynos4210.c | 18 +++--- hw/arm/exynos4_boards.c | 9

[Qemu-devel] [PATCH 2/3] hw/arm/exynos: Declare local variables in some order

2017-05-06 Thread Krzysztof Kozlowski
Bring some more readability by declaring local function variables, first initialized ones and then the rest (with reversed-christmas-tree order). Signed-off-by: Krzysztof Kozlowski --- hw/arm/exynos4210.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/exynos4210

[Qemu-devel] [PATCH 0/3] hw/arm/exynos: QOM-ify the SoC

2017-05-06 Thread Krzysztof Kozlowski
Hi, Convert the Exynos4210 SoC driver into QOM model. No external dependencies, rebased on v2.9.0-363-g0de9191deb14. Best regards, Krzysztof Krzysztof Kozlowski (3): hw/arm/exynos: Move RAM initialization next boards hw/arm/exynos: Declare local variables in some order hw/arm/exynos: QOM

[Qemu-devel] [PATCH v3] hw/misc: Add Exynos4210 Pseudo Random Number Generator

2017-04-25 Thread Krzysztof Kozlowski
exynos-rng drivers: 1. New kcapi-rng interface (targeting Linux v4.12), 2. Old hwrng inteface # echo "exynos" > /sys/class/misc/hw_random/rng_current # dd if=/dev/hwrng of=/dev/null bs=1 count=16 Signed-off-by: Krzysztof Kozlowski --- Changes since v2: 1. Drop GRan

Re: [Qemu-devel] [RFC] hw/arm/exynos: Add generic SDHCI devices

2017-04-22 Thread Krzysztof Kozlowski
On Sat, Apr 22, 2017 at 08:05:41PM +0100, Peter Maydell wrote: > On 22 April 2017 at 19:46, Krzysztof Kozlowski wrote: > > On Thu, Apr 20, 2017 at 02:51:00PM +0100, Peter Maydell wrote: > >> Incidentally someday maybe we should convert this Exynos4210 code > >> to

[Qemu-devel] [PATCH v2] hw/arm/exynos: Add generic SDHCI devices

2017-04-22 Thread Krzysztof Kozlowski
ned-off-by: Krzysztof Kozlowski --- Changes since v1: 1. Fixes after Peter's review. --- hw/arm/exynos4210.c | 29 + 1 file changed, 29 insertions(+) diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c index 0ec4250f0c05..5a622cfedfc8 100644 --- a/hw/arm/exynos

Re: [Qemu-devel] [RFC] hw/arm/exynos: Add generic SDHCI devices

2017-04-22 Thread Krzysztof Kozlowski
On Thu, Apr 20, 2017 at 02:51:00PM +0100, Peter Maydell wrote: > On 16 April 2017 at 16:16, Krzysztof Kozlowski wrote: > > Exynos4210 has four SD/MMC controllers supporting: > > - SD Standard Host Specification Version 2.0, > > - MMC Specification Version 4.3, > >

[Qemu-devel] [RFC] hw/arm/exynos: Add generic SDHCI devices

2017-04-16 Thread Krzysztof Kozlowski
ned-off-by: Krzysztof Kozlowski --- Mostly it works: [ 11.763786] sdhci: Secure Digital Host Controller Interface driver [ 11.764593] sdhci: Copyright(c) Pierre Ossman [ 11.777295] s3c-sdhci 1253.sdhci: clock source 2: mmc_busclk.2 (1200 Hz) [ 11.976250] mmc0: SDHCI controller

Re: [Qemu-devel] [PATCH v2] hw/misc: Add Exynos4210 Pseudo Random Number Generator

2017-04-11 Thread Krzysztof Kozlowski
On Mon, Apr 10, 2017 at 5:15 PM, Peter Maydell wrote: > On 4 April 2017 at 15:31, Krzysztof Kozlowski wrote: >> On Tue, Apr 04, 2017 at 03:05:09PM +0100, Peter Maydell wrote: >>> On 4 April 2017 at 14:44, Krzysztof Kozlowski wrote: >>> > On Tue, Apr 04, 2017 at 0

Re: [Qemu-devel] [PATCH v2] hw/misc: Add Exynos4210 Pseudo Random Number Generator

2017-04-04 Thread Krzysztof Kozlowski
On Tue, Apr 04, 2017 at 03:05:09PM +0100, Peter Maydell wrote: > On 4 April 2017 at 14:44, Krzysztof Kozlowski wrote: > > On Tue, Apr 04, 2017 at 01:09:08PM +0100, Peter Maydell wrote: > >> On 18 March 2017 at 19:25, Krzysztof Kozlowski wrote: > >> > Add emulatio

Re: [Qemu-devel] [PATCH v2] hw/misc: Add Exynos4210 Pseudo Random Number Generator

2017-04-04 Thread Krzysztof Kozlowski
On Tue, Apr 04, 2017 at 01:09:08PM +0100, Peter Maydell wrote: > On 18 March 2017 at 19:25, Krzysztof Kozlowski wrote: > > Add emulation for Exynos4210 Pseudo Random Number Generator which could > > work on fixed seeds or with seeds provided by True Random Number > > Gener

[Qemu-devel] [PATCH v2] hw/misc: Add Exynos4210 Pseudo Random Number Generator

2017-03-18 Thread Krzysztof Kozlowski
t; /sys/class/misc/hw_random/rng_current # dd if=/dev/hwrng of=/dev/null bs=1 count=16 Signed-off-by: Krzysztof Kozlowski --- Changes since v1: 1. Use GRand-like functions to fix build on MingW32 (this adds also finalize). 2. Add DPRINTF macro. 3. Use HWADDR_PRIx and family for printing va

[Qemu-devel] [PATCH] hw/misc: Add Exynos4210 Pseudo Random Number Generator

2017-03-18 Thread Krzysztof Kozlowski
t; /sys/class/misc/hw_random/rng_current # dd if=/dev/hwrng of=/dev/null bs=1 count=16 Signed-off-by: Krzysztof Kozlowski --- hw/arm/exynos4210.c | 4 + hw/misc/Makefile.objs| 2 +- hw/misc/exynos4210_rng.c | 262 +++ 3 files changed, 2

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 0/5] hw: arm: exynos: Bring up secondary CPU + CPUIDLE issue

2017-03-15 Thread Krzysztof Kozlowski
On Wed, Mar 15, 2017 at 08:05:56AM +, Alex Bennée wrote: > > Krzysztof Kozlowski writes: > > > On Tue, Mar 14, 2017 at 06:24:33PM +, Alex Bennée wrote: > >> That means you're on a pre-mttcg tree so that's not the reason. > > > > I mana

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 0/5] hw: arm: exynos: Bring up secondary CPU + CPUIDLE issue

2017-03-14 Thread Krzysztof Kozlowski
On Tue, Mar 14, 2017 at 06:24:33PM +, Alex Bennée wrote: > That means you're on a pre-mttcg tree so that's not the reason. I managed to build it on current master (v2.8.0-2182-g5e2fb7c598c6). It behaves the same (with "-accel tcg,thread=single": cannot reach switching to init). Best regards,

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 0/5] hw: arm: exynos: Bring up secondary CPU + CPUIDLE issue

2017-03-14 Thread Krzysztof Kozlowski
On Tue, Mar 14, 2017 at 04:55:34PM +, Alex Bennée wrote: > > Krzysztof Kozlowski writes: > > > Hi, > > > > > > > Overview of the problem > > === > > On Exynos4210, by default Linux kernel uses cpuidle driver which tries &

[Qemu-devel] [PATCH v3 2/3] hw/char/exynos4210_uart: Constify static array and few arguments

2017-03-13 Thread Krzysztof Kozlowski
The static array exynos4210_uart_regs with register values is not modified so it can be made const. Few other functions accept driver or uart state as an argument but they do not change it and do not cast it so this can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski --- hw

[Qemu-devel] [PATCH v3 3/3] hw/misc/exynos4210_pmu: Reorder local variables for readability

2017-03-13 Thread Krzysztof Kozlowski
Short declaration of 'i' was in the middle of declarations with assignments. Make it a little bit more readable. Additionally switch from "unsigned" to "unsigned int" as this pattern is more widely used. No functional change. Signed-off-by: Krzysztof Kozlowski ---

[Qemu-devel] [PATCH v3 0/3] hw/arm/exynos: Minor cleanups

2017-03-13 Thread Krzysztof Kozlowski
const". 3. Patch 3/3: Use "unsigned int". I had impression that no consensus was reached during discussion. If that is wrong impression, let me know. Best regards, Krzysztof Krzysztof Kozlowski (3): hw/arm/exynos: Convert fprintf to qemu_log_mask/error_report hw/char/exynos4

[Qemu-devel] [PATCH v3 1/3] hw/arm/exynos: Convert fprintf to qemu_log_mask/error_report

2017-03-13 Thread Krzysztof Kozlowski
qemu_log_mask() and error_report() are preferred over fprintf() for logging errors. Also remove square brackets [] and additional new line characters in printed messages. Signed-off-by: Krzysztof Kozlowski --- hw/arm/exynos4_boards.c | 6 +++--- hw/timer/exynos4210_mct.c | 6 -- hw

Re: [Qemu-devel] [PATCH v2 1/3] hw/arm/exynos: Convert fprintf to error_report()

2017-03-13 Thread Krzysztof Kozlowski
On Mon, Mar 13, 2017 at 08:35:55PM +0200, Krzysztof Kozlowski wrote: > error_report() is preferred over fprintf() for logging errors. Also > remove square brackets [] and additional new line characters in printed > messages. > > Signed-off-by: Krzysztof Kozlowski

[Qemu-devel] [PATCH v2 3/3] hw/misc/exynos4210_pmu: Reorder local variables for readability

2017-03-13 Thread Krzysztof Kozlowski
Short declaration of 'i' was in the middle of declarations with assignments. Make it a little bit more readable. Additionally switch from "unsigned" to "unsigned int" as this pattern is more widely used. No functional change. Signed-off-by: Krzysztof Kozlowski ---

[Qemu-devel] [PATCH v2 2/3] hw/char/exynos4210_uart: Constify static array and few arguments

2017-03-13 Thread Krzysztof Kozlowski
The static array exynos4210_uart_regs with register values is not modified so it can be made const. Few other functions accept driver or uart state as an argument but they do not change it and do not cast it so this can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski --- hw

[Qemu-devel] [PATCH v2 1/3] hw/arm/exynos: Convert fprintf to error_report()

2017-03-13 Thread Krzysztof Kozlowski
error_report() is preferred over fprintf() for logging errors. Also remove square brackets [] and additional new line characters in printed messages. Signed-off-by: Krzysztof Kozlowski --- hw/arm/exynos4_boards.c | 6 +++--- hw/timer/exynos4210_mct.c | 5 +++-- hw/timer/exynos4210_pwm.c

[Qemu-devel] [PATCH v2 0/3] hw/arm/exynos: Minor cleanups

2017-03-13 Thread Krzysztof Kozlowski
n. If that is wrong impression, let me know. Best regards, Krzysztof Krzysztof Kozlowski (3): hw/arm/exynos: Convert fprintf to error_report() hw/char/exynos4210_uart: Constify static array and few arguments hw/misc/exynos4210_pmu: Reorder local variables for readability hw/arm/exynos4_b

[Qemu-devel] [PATCH v2 5/5] hw/timer/exynos4210_mct: Remove unused defines

2017-03-13 Thread Krzysztof Kozlowski
Remove defines not used anywhere. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/timer/exynos4210_mct.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c index 4dd3e441e2e6..6069116942a4 100644 --- a/hw/timer

[Qemu-devel] [PATCH v2 3/5] hw/timer/exynos4210_mct: Fix checkpatch style errors

2017-03-13 Thread Krzysztof Kozlowski
Fix checkpatch errors: 1. ERROR: spaces required around that '+' (ctx:VxV) 2. ERROR: spaces required around that '&' (ctx:VxV) No functional changes. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/timer/exynos4210_mct.c | 4 ++-- 1 file cha

[Qemu-devel] [PATCH v2 4/5] hw/timer/exynos4210_mct: Cleanup indentation and empty new lines

2017-03-13 Thread Krzysztof Kozlowski
Statements under 'case' were in some places wrongly indented bringing confusion and making the code less readable. Remove also few unneeded blank lines. No functional changes. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/timer/exynos4210_

[Qemu-devel] [PATCH v2 2/5] hw/intc/exynos4210_gic: Use more meaningful name for local variable

2017-03-13 Thread Krzysztof Kozlowski
e end, next to other uninitialized ones. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/intc/exynos4210_gic.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c index 222cfd6c6387..9a2254f0b13c

[Qemu-devel] [PATCH v2 1/5] hw/intc/exynos4210_gic: Fix GIC memory mappings for secondary CPU

2017-03-13 Thread Krzysztof Kozlowski
ated "num-cpu" property. This fixes the warning and brings second CPU: [0.435780] CPU1: thread -1, cpu 1, socket 9, mpidr 8901 [0.451838] smp: Brought up 1 node, 2 CPUs Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peter Maydell --- hw/intc/exynos4210_gic.c | 21 +

[Qemu-devel] [PATCH v2 0/5] hw: arm: exynos: Bring up secondary CPU + CPUIDLE issue

2017-03-13 Thread Krzysztof Kozlowski
UIDLE being enabled. The cpuidle driver is not relying on DTS. It is just enabled in exynos_defconfig and works. Workarounds === 1. Boot with only 1 cpu 2. Build a kernel with disabled CONFIG_CPU_IDLE Best regards, Krzysztof Krzysztof Kozlowski (5): hw/intc/exynos4210_gic: Fix GIC m

[Qemu-devel] [PATCH v2 2/2] qdev: Constify local variable returned by blk_bs

2017-03-10 Thread Krzysztof Kozlowski
Inside qdev_prop_set_drive() the value returned by blk_bs() is passed only as pointer to const to bdrv_get_node_name() and pointed values is not modified in other places so this can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski --- hw/core/qdev-properties-system.c | 2

[Qemu-devel] [PATCH v2 0/2] qdev: Minor const improvements

2017-03-10 Thread Krzysztof Kozlowski
Hi, Minor improvements. Changes since v1: 1. Follow suggestions from v1 discussion - drop other consts. Best regards, Krzysztof Krzysztof Kozlowski (2): qdev: Constify value passed to qdev_prop_set_macaddr qdev: Constify local variable returned by blk_bs hw/core/qdev-properties-system.c

[Qemu-devel] [PATCH v2 1/2] qdev: Constify value passed to qdev_prop_set_macaddr

2017-03-10 Thread Krzysztof Kozlowski
The 'value' argument is not modified so this can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski --- hw/core/qdev-properties.c| 3 ++- include/hw/qdev-properties.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/core/qdev-properties.c

Re: [Qemu-devel] [PATCH] qdev: Constify data pointed by few arguments and local variables

2017-03-08 Thread Krzysztof Kozlowski
On Wed, Mar 08, 2017 at 04:22:01PM -0300, Eduardo Habkost wrote: > On Wed, Mar 08, 2017 at 09:06:06PM +0200, Krzysztof Kozlowski wrote: > > > > The object_property_set_str() takes data as pointer to const. If data > > > > ends up as being non-cons

Re: [Qemu-devel] [PATCH] qdev: Constify data pointed by few arguments and local variables

2017-03-08 Thread Krzysztof Kozlowski
On Wed, Mar 08, 2017 at 03:57:26PM -0300, Eduardo Habkost wrote: > On Wed, Mar 08, 2017 at 06:22:13PM +0200, Krzysztof Kozlowski wrote: > > On Mon, Mar 06, 2017 at 09:09:48AM -0300, Eduardo Habkost wrote: > > > Hi, > > > > > > > > > On Sun, Mar 05,

Re: [Qemu-devel] [PATCH] qdev: Constify data pointed by few arguments and local variables

2017-03-08 Thread Krzysztof Kozlowski
On Mon, Mar 06, 2017 at 09:09:48AM -0300, Eduardo Habkost wrote: > Hi, > > > On Sun, Mar 05, 2017 at 11:46:33PM +0200, Krzysztof Kozlowski wrote: > > In few places the function arguments and local variables are not > > modifying data passed through pointers so this can be

Re: [Qemu-devel] [Qemu-arm] [PATCH 3/3] hw/misc/exynos4210_pmu: Reorder local variables for readability

2017-03-06 Thread Krzysztof Kozlowski
On Mon, Mar 06, 2017 at 01:06:29AM -0300, Philippe Mathieu-Daudé wrote: > Hi Krzysztof, > > On 03/05/2017 06:48 PM, Krzysztof Kozlowski wrote: > > Short declaration of 'i' was in the middle of declarations with > > assignments. Make it a little bit more

Re: [Qemu-devel] [PATCH 2/3] hw/arm/exynos4210: Constify data pointed by few arguments and variables

2017-03-06 Thread Krzysztof Kozlowski
On Mon, Mar 06, 2017 at 09:44:49AM +, Peter Maydell wrote: > On 5 March 2017 at 21:48, Krzysztof Kozlowski wrote: > > In few places the function arguments and local variables are not > > modifying data passed through pointers so this can be made const for > > code safen

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/3] hw/arm/exynos: Convert fprintf to error_report()

2017-03-06 Thread Krzysztof Kozlowski
On Sun, Mar 05, 2017 at 06:56:09PM -0300, Philippe Mathieu-Daudé wrote: > Hi Krzysztof, > > On 03/05/2017 06:48 PM, Krzysztof Kozlowski wrote: > > error_report() is preferred over fprintf() for logging errors. Also > > remove square brackets [] and additional new line

Re: [Qemu-devel] [PATCH 1/3] hw/arm/exynos: Convert fprintf to error_report()

2017-03-06 Thread Krzysztof Kozlowski
On Mon, Mar 06, 2017 at 10:55:12AM -0600, Eric Blake wrote: > On 03/05/2017 03:48 PM, Krzysztof Kozlowski wrote: > > error_report() is preferred over fprintf() for logging errors. Also > > remove square brackets [] and additional new line characters in printed > > messages. &

[Qemu-devel] [PATCH 3/3] hw/misc/exynos4210_pmu: Reorder local variables for readability

2017-03-05 Thread Krzysztof Kozlowski
Short declaration of 'i' was in the middle of declarations with assignments. Make it a little bit more readable. No functional change. Signed-off-by: Krzysztof Kozlowski --- hw/misc/exynos4210_pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 2/3] hw/arm/exynos4210: Constify data pointed by few arguments and variables

2017-03-05 Thread Krzysztof Kozlowski
In few places the function arguments and local variables are not modifying data passed through pointers so this can be made const for code safeness. Also the static array exynos4210_uart_regs is not being modified. Signed-off-by: Krzysztof Kozlowski --- hw/char/exynos4210_uart.c | 10

[Qemu-devel] [PATCH 1/3] hw/arm/exynos: Convert fprintf to error_report()

2017-03-05 Thread Krzysztof Kozlowski
error_report() is preferred over fprintf() for logging errors. Also remove square brackets [] and additional new line characters in printed messages. Signed-off-by: Krzysztof Kozlowski --- hw/arm/exynos4_boards.c | 6 +++--- hw/timer/exynos4210_mct.c | 5 +++-- hw/timer/exynos4210_pwm.c

[Qemu-devel] [PATCH] qdev: Constify data pointed by few arguments and local variables

2017-03-05 Thread Krzysztof Kozlowski
In few places the function arguments and local variables are not modifying data passed through pointers so this can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski --- hw/core/qdev-properties-system.c | 6 +++--- hw/core/qdev-properties.c| 7 --- include/hw

[Qemu-devel] [PATCH 2/2] char: Remove confusing mix of assignment with local variables

2017-03-05 Thread Krzysztof Kozlowski
The assignment under pointed offset was put next to declaration of local variables. This might be quite confusing as the assignment looks like duplicated declaration of offset variable. Signed-off-by: Krzysztof Kozlowski --- chardev/char.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[Qemu-devel] [PATCH 1/2] char: Constify data pointed by few arguments and local variables

2017-03-05 Thread Krzysztof Kozlowski
In few places the function arguments and local variables are not modifying data passed through pointers so this can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski --- chardev/char.c| 18 +- include/sysemu/char.h | 2 +- 2 files changed, 10

[Qemu-devel] [PATCH] block: Constify data passed by pointer to blk_name

2017-03-05 Thread Krzysztof Kozlowski
blk_name() is not modifying data passed to it through pointer and it returns also a pointer to const so the argument can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski --- block/block-backend.c | 2 +- include/sysemu/block-backend.h | 2 +- 2 files changed, 2

Re: [Qemu-devel] [RFC 0/5] hw: arm: exynos: Bring up secondary CPU + CPUIDLE issue

2017-03-05 Thread Krzysztof Kozlowski
On Thu, Mar 02, 2017 at 04:56:22PM +, Peter Maydell wrote: > On 1 March 2017 at 18:26, Krzysztof Kozlowski wrote: > > Overview of the problem > > === > > On Exynos4210, by default Linux kernel uses cpuidle driver which tries > > to enter low p

Re: [Qemu-devel] [PATCH 1/5] hw/intc/exynos4210_gic: Fix GIC memory mappings for secondary CPU

2017-03-02 Thread Krzysztof Kozlowski
On Thu, Mar 2, 2017 at 6:37 PM, Peter Maydell wrote: > On 1 March 2017 at 18:26, Krzysztof Kozlowski wrote: >> Recent Linux kernel (tested next-20170224) was complaining about missing >> GIC mask and was unable to bring up secondary CPU: >> >> [0.0

Re: [Qemu-devel] [PATCH 4/5] hw/timer/exynos4210_mct: Fix checkpatch style errors

2017-03-02 Thread Krzysztof Kozlowski
On Thu, Mar 2, 2017 at 6:44 PM, Peter Maydell wrote: > On 1 March 2017 at 18:26, Krzysztof Kozlowski wrote: >> Fix checkpatch errors: >> 1. ERROR: spaces required around that '+' (ctx:VxV) >> 2. ERROR: spaces required around that '&' (ctx:VxV) >

[Qemu-devel] [PATCH 3/5] hw/timer/exynos4210_mct: Cleanup indentation and empty new lines

2017-03-01 Thread Krzysztof Kozlowski
Statements under 'case' were in some places wrongly indented bringing confusion and making the code less readable. Remove also few unneeded blank lines. No functional changes. Signed-off-by: Krzysztof Kozlowski --- hw/timer/exynos4210_

[Qemu-devel] [PATCH 5/5] hw/timer/exynos4210_mct: Remove unused defines

2017-03-01 Thread Krzysztof Kozlowski
Remove defines not used anywhere. Signed-off-by: Krzysztof Kozlowski --- hw/timer/exynos4210_mct.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c index 4dd3e441e2e6..6069116942a4 100644 --- a/hw/timer/exynos4210_mct.c +++ b/hw/timer

[Qemu-devel] [PATCH 1/5] hw/intc/exynos4210_gic: Fix GIC memory mappings for secondary CPU

2017-03-01 Thread Krzysztof Kozlowski
ated "num-cpu" property. This fixes the warning and brings second CPU: [0.435780] CPU1: thread -1, cpu 1, socket 9, mpidr 8901 [0.451838] smp: Brought up 1 node, 2 CPUs Signed-off-by: Krzysztof Kozlowski --- But please read cover letter! --- hw/intc/exynos4210_gic

[Qemu-devel] [PATCH 4/5] hw/timer/exynos4210_mct: Fix checkpatch style errors

2017-03-01 Thread Krzysztof Kozlowski
Fix checkpatch errors: 1. ERROR: spaces required around that '+' (ctx:VxV) 2. ERROR: spaces required around that '&' (ctx:VxV) No functional changes. Signed-off-by: Krzysztof Kozlowski --- hw/timer/exynos4210_mct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 delet

  1   2   >