[Qemu-devel] [PATCH 0/2]block: m25p80: Improve mt25qu01g chip model

2016-12-16 Thread marcin.krzeminski
From: Marcin Krzeminski This series introduce some improvememnt targeting mt25qu01g. Marcin Krzeminski (2): block: m25p80: Add Quad Page Program 4byte version op block: m25p80: Introduce Die Erase command hw/block/m25p80.c | 37 + 1 file changed, 33 inse

[Qemu-devel] [PATCH 1/2] block: m25p80: Add Quad Page Program 4byte version op

2016-12-16 Thread marcin.krzeminski
From: Marcin Krzeminski Some flash chips has additional page program opcode that takes only 4 byte address. This commit adds support for such command in Qemu. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/block/m25p80.c b/hw/b

[Qemu-devel] [PATCH 2/2] block: m25p80: Introduce Die Erase command

2016-12-16 Thread marcin.krzeminski
From: Marcin Krzeminski Big flash chips (like mt25qu01g) are consisted from dies. Because of that some manufactures remove support for Chip Erase giving Die Erase command instead.To avoid unnecessary code complication, support for chip erase for mt25qu01g is not removed. Signed-off-by: Marcin Kr

[Qemu-devel] [RFC 3/3] exec: Allow to change Address Space from board level

2016-12-16 Thread marcin.krzeminski
From: Marcin Krzeminski By introduction of CPUAddressSpace table it is not possible to change address space for CPU from board code. In my case Cortex-M3 core has it own address space that is created at board level, then updated by changing cpu->as. For current code cpu->as is used only at init,

[Qemu-devel] [RFC 2/3] ARM: boot: Add option to skip FDT memory node update

2016-12-16 Thread marcin.krzeminski
From: Marcin Krzeminski When Qemu boots directly ARM kernel the memory node in device tree is automatically updated to mach guest RAM size assigned to Qemu. This commit allow use case when user do not want to pass all guest RAM to linux kernel by skipping device tree mmory node update. Signed-of

[Qemu-devel] [RFC 0/3] MultiCPU changes

2016-12-16 Thread marcin.krzeminski
From: Marcin Krzeminski Those are changes that I made to create SoC model with 2xCortexA9 and Cortex-M3. Generally all are done to allow move work further, not to upstreaming (especially patch 3). I would like to start discossion if those modification could be upstreamed. Marcin Krzeminski (3):

[Qemu-devel] [RFC 1/3] nvic: Add CPU numebr property

2016-12-16 Thread marcin.krzeminski
From: Marcin Krzeminski In case of MultiCPU SoC M3 is not always CPU0. This commit add cpu_id property to allow set CPU number for NVIC model. Also address space that this used by NVIC is updated to mach CPU's one. Signed-off-by: Marcin Krzeminski --- hw/intc/armv7m_nvic.c | 24 +++

[Qemu-devel] [v3] nvic: set pending status for not active interrupts

2016-10-31 Thread marcin.krzeminski
From: Marcin Krzeminski According to ARM DUI 0552A 4.2.10. NVIC set pending status also for disabled interrupts. This patch adds possibility to emulate this in Qemu. Signed-off-by: Marcin Krzeminski --- v3: - corrected logic to reflect NVIC behaviour v2: - add a dedicated function for n

[Qemu-devel] [v2] nvic: set pending status for not active interrupts

2016-10-18 Thread marcin.krzeminski
From: Marcin Krzeminski According to ARM DUI 0552A 4.2.10. NVIC set pending status also for disabled interrupts. This patch adds possibility to emulate this in Qemu. Signed-off-by: Marcin Krzeminski --- Changes for v2: - add a dedicated unction for nvic - update complete_irq hw/intc/ar

[Qemu-devel] [PATCH] nvic: allow to set pending status for not active interrupts

2016-10-07 Thread marcin.krzeminski
From: Marcin Krzeminski According to ARM DUI 0552A 4.2.10. NVIC set pending status also for disabled interrupts. This patch adds possibility to emulate this in Qemu. Signed-off-by: Marcin Krzeminski --- hw/intc/arm_gic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/

[Qemu-devel] [PATCH v2] block: m25p80c Fix vmstate structure name

2016-09-06 Thread marcin.krzeminski
From: Marcin Krzeminski Correct bad name of the vmstate structure. Since this breaks compatibility also update vmstate version back to 0 and make all fields independent of the VMState version. Signed-off-by: Marcin Krzeminski Acked-by: Alistair Francis --- V2: rewrite commit message hw/block

[Qemu-devel] [PATCH] block: m25p80c Fix vmstate structure name

2016-08-19 Thread marcin.krzeminski
From: Marcin Krzeminski Change wrong name of the vmstate structure. Since this breaks compatibility update version and fields to 0. Signed-off-by: Marcin Krzeminski --- This patch assumes that none migrates m25p80 flash devices. hw/block/m25p80.c | 29 ++--- 1 file ch

[Qemu-devel] [PATCH] m25p80: Fix QIOR/DIOR handling for Winbond

2016-07-06 Thread marcin.krzeminski
From: Marcin Krzeminski Winbond also support continuous read mode, but as an opposite for other flash type read mode clock cycles are included to dummy cycles number. This path add proper handling of read mode byte and update needed dummy cycles. QPI mode and dummy cycles configuration are not su

[Qemu-devel] [PATCH v3 05/10] m25p80: Add additional flash commands:

2016-06-24 Thread marcin.krzeminski
From: Marcin Krzeminski Page program 4byte/quad and erase 32K sectors 4 bytes. Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater --- hw/block/m25p80.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index ca1f882..55b4377 100644

[Qemu-devel] [PATCH v3 00/10] m25p80: Add new 512Mbit and 1Gbit devices

2016-06-24 Thread marcin.krzeminski
From: Marcin Krzeminski This series adds support for new flash devices. V3: * Add ReadMode handling in Dual/Quad readd for Spansion * Macronix/Spansion are tested with the same tests as real HW V2: * Move fast read command family handling to functions * Fix broken Winbond support Marcin Krzem

[Qemu-devel] [PATCH v3 06/10] m25p80: Introduce quad and equad modes.

2016-06-24 Thread marcin.krzeminski
From: Marcin Krzeminski Quad and Equad modes for Spansion and Macronix flash devices. This commit also includes modification and new command to manipulate quad mode (status registers and dedicated commands). This work is based on Pawel Lenkow work. Signed-off-by: Marcin Krzeminski Reviewed-by:

[Qemu-devel] [PATCH v3 09/10] m25p80: New flash devices.

2016-06-24 Thread marcin.krzeminski
From: Marcin Krzeminski Macronix: mx66u51235f and mx66u1g45g Micron: mt25ql01g and mt25qu01g Spansion: s25fs512s and s70fs01gs Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater --- hw/block/m25p80.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH v3 08/10] m25p80: Fast read commands family changes.

2016-06-24 Thread marcin.krzeminski
From: Marcin Krzeminski Support for Spansion and Macronix flashes. Additionally Numonyx(Micron) moved from default in fast read commands family. Also moved fast read command decoding to functions. Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater --- hw/block/m25p80.c | 154 +

[Qemu-devel] [PATCH v3 07/10] m25p80: Introduce configuration registers.

2016-06-24 Thread marcin.krzeminski
From: Marcin Krzeminski Configuration registers for Spansion and Macronix devices. Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater --- hw/block/m25p80.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/hw/block/m25p80.c b/hw/b

[Qemu-devel] [PATCH v3 01/10] m25p80: Replace JEDEC ID masking with function.

2016-06-24 Thread marcin.krzeminski
From: Marcin Krzeminski Instead of always reading and comparing jededc ID, replace it by function. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 49 - 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/hw/block/m25p80.c b/h

[Qemu-devel] [PATCH v3 04/10] m25p80: Introduce COLLECTING_VAR_LEN_DATA state.

2016-06-24 Thread marcin.krzeminski
From: Marcin Krzeminski Some flash allows to stop read at any time. Allow framework to support this. Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater --- hw/block/m25p80.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 6910c5

[Qemu-devel] [PATCH v3 10/10] m25p80: Fix WINBOND fast read command handling

2016-06-24 Thread marcin.krzeminski
From: Marcin Krzeminski This commit fix obvious bug in WINBOND command handling. Datasheet states that default dummy cycles is 8 so fix it. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/block/m25p80.c b/hw/b

[Qemu-devel] [PATCH v3 02/10] m25p80: Make a table for JEDEC ID.

2016-06-24 Thread marcin.krzeminski
From: Marcin Krzeminski Since it is now longer than 4. This work based on Pawel Lenkow changes and the kernel SPI framework. Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater --- hw/block/m25p80.c | 61 ++- 1 file changed, 42 in

[Qemu-devel] [PATCH v3 03/10] m25p80: Allow more than four banks.

2016-06-24 Thread marcin.krzeminski
From: Marcin Krzeminski Allow to have more than four 16MiB regions for bigger flash devices. Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater --- hw/block/m25p80.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c inde

[Qemu-devel] [PATCH v2 01/10] m25p80: Replace JEDEC ID masking with function.

2016-06-17 Thread marcin.krzeminski
From: Marcin Krzeminski Instead of always reading and comparing jededc ID, replace it by function. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 49 - 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/hw/block/m25p80.c b/h

[Qemu-devel] [PATCH v2 07/10] m25p80: Introduce configuration registers.

2016-06-17 Thread marcin.krzeminski
From: Marcin Krzeminski Configuration registers for Spansion and Macronix devices. Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater --- hw/block/m25p80.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/hw/block/m25p80.c b/hw/b

[Qemu-devel] [PATCH v2 03/10] m25p80: Allow more than four banks.

2016-06-17 Thread marcin.krzeminski
From: Marcin Krzeminski Allow to have more than four 16MiB regions for bigger flash devices. Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater --- hw/block/m25p80.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c inde

[Qemu-devel] [PATCH v2 06/10] m25p80: Introduce quad and equad modes.

2016-06-17 Thread marcin.krzeminski
From: Marcin Krzeminski Quad and Equad modes for Spansion and Macronix flash devices. This commit also includes modification and new command to manipulate quad mode (status registers and dedicated commands). This work is based on Pawel Lenkow work. Signed-off-by: Marcin Krzeminski --- hw/block

[Qemu-devel] [PATCH v2 10/10] m25p80.c: Fix WINBOND fast read command handling

2016-06-17 Thread marcin.krzeminski
From: Marcin Krzeminski This commit fix obvious bug in WINBOND command handling. Datasheet states that default dummy cycles is 8 so fix it. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/block/m25p80.c b/hw/b

[Qemu-devel] [PATCH v2 09/10] m25p80: New flash devices.

2016-06-17 Thread marcin.krzeminski
From: Marcin Krzeminski Macronix: mx66u51235f and mx66u1g45g Micron: mt25ql01g and mt25qu01g Spansion: s25fs512s and s70fs01gs Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater --- hw/block/m25p80.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH v2 02/10] m25p80: Make a table for JEDEC ID.

2016-06-17 Thread marcin.krzeminski
From: Marcin Krzeminski Since it is now longer than 4. This work based on Pawel Lenkow changes and the kernel SPI framework. Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater --- hw/block/m25p80.c | 61 ++- 1 file changed, 42 in

[Qemu-devel] [PATCH v2 08/10] m25p80: Fast read commands family changes.

2016-06-17 Thread marcin.krzeminski
From: Marcin Krzeminski Support for Spansion and Macronix flashes. Additionally Numonyx(Micron) moved from default in fast read commands family. Also moved fast read command decoding to functions. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 145

[Qemu-devel] [PATCH v2 05/10] m25p80: Add additional flash commands:

2016-06-17 Thread marcin.krzeminski
From: Marcin Krzeminski Page program 4byte/quad and erase 32K sectors 4 bytes. Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater --- hw/block/m25p80.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index ca1f882..55b4377 100644

[Qemu-devel] [PATCH v2 04/10] m25p80: Introduce COLLECTING_VAR_LEN_DATA state.

2016-06-17 Thread marcin.krzeminski
From: Marcin Krzeminski Some flash allows to stop read at any time. Allow framework to support this. Signed-off-by: Marcin Krzeminski Reviewed-by: Cédric Le Goater --- hw/block/m25p80.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 6910c5

[Qemu-devel] [PATCH v2 00/10] m25p80: Add new 512Mbit and 1Gbit devices.

2016-06-17 Thread marcin.krzeminski
From: Marcin Krzeminski This series adds support for new flash devices. V2: * Move fast read command family handling to functions * Fix broken Winbond support Marcin Krzeminski (10): m25p80: Replace JEDEC ID masking with function. m25p80: Make a table for JEDEC ID. m25p80: Allow more than

[Qemu-devel] [PATCH 9/9] m25p80: New flash devices.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Macronix: mx66u51235f and mx66u1g45g Micron: mt25ql01g and mt25qu01g Spansion: s25fs512s and s70fs01gs Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/hw/block/m25p80.c b/hw/

[Qemu-devel] [PATCH 7/9] m25p80: Introduce configuration registers.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Configuration registers for Spansion and Macronix devices. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index d1c4d46..21

[Qemu-devel] [PATCH 1/9] m25p80: Replace JEDEC ID masking with function.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Instead of always reading and comparing jededc ID, replace it by function. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 49 - 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/hw/block/m25p80.c b/h

[Qemu-devel] [PATCH 8/9] m25p80: Fast read commands family changes.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Add support for Spansion and Macronix flashes. Additionally Numonyx(Micron) move from default in fast read commands family. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 72 --- 1 file changed, 64 insertions

[Qemu-devel] [PATCH 4/9] m25p80: Introduce COLLECTING_VAR_LEN_DATA state.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Some flash allows to stop read at any time. Allow framework to support this. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 6910c52..ca1f882 100644 --- a/hw/bloc

[Qemu-devel] [PATCH 2/9] m25p80: Make a table for JEDEC ID.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Since it is now longer than 4. This work based on Pawel Lenkow changes and the kernel SPI framework. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 61 ++- 1 file changed, 42 insertions(+), 19 deletions(-) d

[Qemu-devel] [PATCH 3/9] m25p80: Allow more than four banks.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Allow to have more than four 16MiB regions for bigger flash devices. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 342f7c9..6910c52 100644 --- a

[Qemu-devel] [PATCH 0/9] m25p80: Add new 512Mbit and 1Gbit devices.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski This series adds support for new flash devices. Marcin Krzeminski (9): m25p80: Replace JEDEC ID masking with function. m25p80: Make a table for JEDEC ID. m25p80: Allow more than four banks. m25p80: Introduce COLLECTING_VAR_LEN_DATA state. m25p80: Add additional

[Qemu-devel] [PATCH 5/9] m25p80: Add additional flash commands:

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Page program 4byte/quad and erase 32K sectors 4 bytes. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index ca1f882..55b4377 100644 --- a/hw/block/m25p80.c +++ b/h

[Qemu-devel] [PATCH 6/9] m25p80: Introduce quad and equad modes.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Quad and Equad modes for Spansion and Macronix flash devices. This commit also includes modification and new command to manipulate quad mode (status registers and dedicated commands). This work is based on Pawel Lenkow work. Signed-off-by: Marcin Krzeminski --- hw/block