qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/4] AVR patches for 2021-03-15
@ 2021-03-14 23:46 Philippe Mathieu-Daudé
  2021-03-14 23:46 ` [PULL 1/4] hw/misc/led: Add yellow LED Philippe Mathieu-Daudé
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-14 23:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Sarah Harris, Michael Rolnik, Philippe Mathieu-Daudé

The following changes since commit 6157b0e19721aadb4c7fdcfe57b2924af6144b14:

  Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.0-pull-request' into staging (2021-03-14 17:47:49 +0000)

are available in the Git repository at:

  https://github.com/philmd/qemu.git tags/avr-20210315

for you to fetch changes up to 56b90e60c4019b08012bd8bd1459efc00b055577:

  target/avr: Fix interrupt execution (2021-03-15 00:39:52 +0100)

----------------------------------------------------------------
AVR patches queue

- Only reset 'interrupt_request' mask once all interrupts executed
- Documentation and typo fixes
----------------------------------------------------------------

Ivanov Arkasha (1):
  target/avr: Fix interrupt execution

Lichang Zhao (1):
  target/avr: Fix some comment spelling errors

Philippe Mathieu-Daudé (2):
  hw/misc/led: Add yellow LED
  hw/avr/arduino: List board schematic links

 include/hw/misc/led.h |  1 +
 hw/avr/arduino.c      | 20 ++++++++++++++++----
 hw/misc/led.c         |  1 +
 target/avr/helper.c   | 10 ++++++----
 4 files changed, 24 insertions(+), 8 deletions(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PULL 1/4] hw/misc/led: Add yellow LED
  2021-03-14 23:46 [PULL 0/4] AVR patches for 2021-03-15 Philippe Mathieu-Daudé
@ 2021-03-14 23:46 ` Philippe Mathieu-Daudé
  2021-03-14 23:46 ` [PULL 2/4] hw/avr/arduino: List board schematic links Philippe Mathieu-Daudé
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-14 23:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Richard Henderson, Sarah Harris, Michael Rolnik,
	Philippe Mathieu-Daudé

Add the yellow "lime" LED.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Michael Rolnik <mrolnik@gmail.com>
Message-Id: <20210313165445.2113938-2-f4bug@amsat.org>
---
 include/hw/misc/led.h | 1 +
 hw/misc/led.c         | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/hw/misc/led.h b/include/hw/misc/led.h
index aa359b87c20..29c08795708 100644
--- a/include/hw/misc/led.h
+++ b/include/hw/misc/led.h
@@ -27,6 +27,7 @@ typedef enum {          /* Coarse wavelength range */
     LED_COLOR_BLUE,     /* 475 nm */
     LED_COLOR_CYAN,     /* 500 nm */
     LED_COLOR_GREEN,    /* 535 nm */
+    LED_COLOR_YELLOW,   /* 567 nm */
     LED_COLOR_AMBER,    /* 590 nm */
     LED_COLOR_ORANGE,   /* 615 nm */
     LED_COLOR_RED,      /* 630 nm */
diff --git a/hw/misc/led.c b/hw/misc/led.c
index 5266d026d0b..f552b8b6483 100644
--- a/hw/misc/led.c
+++ b/hw/misc/led.c
@@ -20,6 +20,7 @@ static const char * const led_color_name[] = {
     [LED_COLOR_BLUE]    = "blue",
     [LED_COLOR_CYAN]    = "cyan",
     [LED_COLOR_GREEN]   = "green",
+    [LED_COLOR_YELLOW]  = "yellow",
     [LED_COLOR_AMBER]   = "amber",
     [LED_COLOR_ORANGE]  = "orange",
     [LED_COLOR_RED]     = "red",
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PULL 2/4] hw/avr/arduino: List board schematic links
  2021-03-14 23:46 [PULL 0/4] AVR patches for 2021-03-15 Philippe Mathieu-Daudé
  2021-03-14 23:46 ` [PULL 1/4] hw/misc/led: Add yellow LED Philippe Mathieu-Daudé
@ 2021-03-14 23:46 ` Philippe Mathieu-Daudé
  2021-03-14 23:46 ` [PULL 3/4] target/avr: Fix some comment spelling errors Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-14 23:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Richard Henderson, Sarah Harris, Michael Rolnik,
	Philippe Mathieu-Daudé

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Michael Rolnik <mrolnik@gmail.com>
Message-Id: <20210313165445.2113938-3-f4bug@amsat.org>
---
 hw/avr/arduino.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/hw/avr/arduino.c b/hw/avr/arduino.c
index 3c8388490d6..3ff31492fa6 100644
--- a/hw/avr/arduino.c
+++ b/hw/avr/arduino.c
@@ -75,7 +75,10 @@ static void arduino_duemilanove_class_init(ObjectClass *oc, void *data)
     MachineClass *mc = MACHINE_CLASS(oc);
     ArduinoMachineClass *amc = ARDUINO_MACHINE_CLASS(oc);
 
-    /* https://www.arduino.cc/en/Main/ArduinoBoardDuemilanove */
+    /*
+     * https://www.arduino.cc/en/Main/ArduinoBoardDuemilanove
+     * https://www.arduino.cc/en/uploads/Main/arduino-duemilanove-schematic.pdf
+     */
     mc->desc        = "Arduino Duemilanove (ATmega168)",
     mc->alias       = "2009";
     amc->mcu_type   = TYPE_ATMEGA168_MCU;
@@ -87,7 +90,10 @@ static void arduino_uno_class_init(ObjectClass *oc, void *data)
     MachineClass *mc = MACHINE_CLASS(oc);
     ArduinoMachineClass *amc = ARDUINO_MACHINE_CLASS(oc);
 
-    /* https://store.arduino.cc/arduino-uno-rev3 */
+    /*
+     * https://store.arduino.cc/arduino-uno-rev3
+     * https://www.arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf
+     */
     mc->desc        = "Arduino UNO (ATmega328P)";
     mc->alias       = "uno";
     amc->mcu_type   = TYPE_ATMEGA328_MCU;
@@ -99,7 +105,10 @@ static void arduino_mega_class_init(ObjectClass *oc, void *data)
     MachineClass *mc = MACHINE_CLASS(oc);
     ArduinoMachineClass *amc = ARDUINO_MACHINE_CLASS(oc);
 
-    /* https://www.arduino.cc/en/Main/ArduinoBoardMega */
+    /*
+     * https://www.arduino.cc/en/Main/ArduinoBoardMega
+     * https://www.arduino.cc/en/uploads/Main/arduino-mega2560-schematic.pdf
+     */
     mc->desc        = "Arduino Mega (ATmega1280)";
     mc->alias       = "mega";
     amc->mcu_type   = TYPE_ATMEGA1280_MCU;
@@ -111,7 +120,10 @@ static void arduino_mega2560_class_init(ObjectClass *oc, void *data)
     MachineClass *mc = MACHINE_CLASS(oc);
     ArduinoMachineClass *amc = ARDUINO_MACHINE_CLASS(oc);
 
-    /* https://store.arduino.cc/arduino-mega-2560-rev3 */
+    /*
+     * https://store.arduino.cc/arduino-mega-2560-rev3
+     * https://www.arduino.cc/en/uploads/Main/arduino-mega2560_R3-sch.pdf
+     */
     mc->desc        = "Arduino Mega 2560 (ATmega2560)";
     mc->alias       = "mega2560";
     amc->mcu_type   = TYPE_ATMEGA2560_MCU;
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PULL 3/4] target/avr: Fix some comment spelling errors
  2021-03-14 23:46 [PULL 0/4] AVR patches for 2021-03-15 Philippe Mathieu-Daudé
  2021-03-14 23:46 ` [PULL 1/4] hw/misc/led: Add yellow LED Philippe Mathieu-Daudé
  2021-03-14 23:46 ` [PULL 2/4] hw/avr/arduino: List board schematic links Philippe Mathieu-Daudé
@ 2021-03-14 23:46 ` Philippe Mathieu-Daudé
  2021-03-14 23:46 ` [PULL 4/4] target/avr: Fix interrupt execution Philippe Mathieu-Daudé
  2021-03-15 19:22 ` [PULL 0/4] AVR patches for 2021-03-15 Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-14 23:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Lichang Zhao, David Edmondson, Sarah Harris, Michael Rolnik,
	Philippe Mathieu-Daudé

From: Lichang Zhao <zhaolichang@huawei.com>

I found that there are many spelling errors in the comments of qemu/target/avr.
I used spellcheck to check the spelling errors and found some errors in the folder.

Signed-off-by: Lichang Zhao <zhaolichang@huawei.com>
Reviewed-by: David Edmondson <david.edmondson@oracle.com>
Reviewed-by: Philippe Mathieu-Daude<f4bug@amsat.org>
Message-Id: <20201009064449.2336-12-zhaolichang@huawei.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Michael Rolnik <mrolnik@gmail.com>
---
 target/avr/helper.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/avr/helper.c b/target/avr/helper.c
index 65880b9928c..b4532de2523 100644
--- a/target/avr/helper.c
+++ b/target/avr/helper.c
@@ -98,7 +98,7 @@ int avr_cpu_memory_rw_debug(CPUState *cs, vaddr addr, uint8_t *buf,
 
 hwaddr avr_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
 {
-    return addr; /* I assume 1:1 address correspondance */
+    return addr; /* I assume 1:1 address correspondence */
 }
 
 bool avr_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
@@ -299,7 +299,7 @@ void helper_outb(CPUAVRState *env, uint32_t port, uint32_t data)
 }
 
 /*
- *  this function implements LD instruction when there is a posibility to read
+ *  this function implements LD instruction when there is a possibility to read
  *  from a CPU register
  */
 target_ulong helper_fullrd(CPUAVRState *env, uint32_t addr)
@@ -323,7 +323,7 @@ target_ulong helper_fullrd(CPUAVRState *env, uint32_t addr)
 }
 
 /*
- *  this function implements ST instruction when there is a posibility to write
+ *  this function implements ST instruction when there is a possibility to write
  *  into a CPU register
  */
 void helper_fullwr(CPUAVRState *env, uint32_t data, uint32_t addr)
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PULL 4/4] target/avr: Fix interrupt execution
  2021-03-14 23:46 [PULL 0/4] AVR patches for 2021-03-15 Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2021-03-14 23:46 ` [PULL 3/4] target/avr: Fix some comment spelling errors Philippe Mathieu-Daudé
@ 2021-03-14 23:46 ` Philippe Mathieu-Daudé
  2021-03-15 19:22 ` [PULL 0/4] AVR patches for 2021-03-15 Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-14 23:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Sarah Harris, Ivanov Arkasha, Michael Rolnik,
	Philippe Mathieu-Daudé

From: Ivanov Arkasha <ivanovrkasha@gmail.com>

Only one interrupt is in progress at the moment.
It is only necessary to set to reset interrupt_request
after all interrupts have been executed.

Signed-off-by: Ivanov Arkasha <ivanovrkasha@gmail.com>
Message-Id: <20210312164754.18437-1-arkaisp2021@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Michael Rolnik <mrolnik@gmail.com>
---
 target/avr/helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/avr/helper.c b/target/avr/helper.c
index b4532de2523..35e10195940 100644
--- a/target/avr/helper.c
+++ b/target/avr/helper.c
@@ -49,7 +49,9 @@ bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
             cc->tcg_ops->do_interrupt(cs);
 
             env->intsrc &= env->intsrc - 1; /* clear the interrupt */
-            cs->interrupt_request &= ~CPU_INTERRUPT_HARD;
+            if (!env->intsrc) {
+                cs->interrupt_request &= ~CPU_INTERRUPT_HARD;
+            }
 
             ret = true;
         }
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PULL 0/4] AVR patches for 2021-03-15
  2021-03-14 23:46 [PULL 0/4] AVR patches for 2021-03-15 Philippe Mathieu-Daudé
                   ` (3 preceding siblings ...)
  2021-03-14 23:46 ` [PULL 4/4] target/avr: Fix interrupt execution Philippe Mathieu-Daudé
@ 2021-03-15 19:22 ` Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2021-03-15 19:22 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: Sarah Harris, Michael Rolnik, QEMU Developers

On Sun, 14 Mar 2021 at 23:48, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> The following changes since commit 6157b0e19721aadb4c7fdcfe57b2924af6144b14:
>
>   Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.0-pull-request' into staging (2021-03-14 17:47:49 +0000)
>
> are available in the Git repository at:
>
>   https://github.com/philmd/qemu.git tags/avr-20210315
>
> for you to fetch changes up to 56b90e60c4019b08012bd8bd1459efc00b055577:
>
>   target/avr: Fix interrupt execution (2021-03-15 00:39:52 +0100)
>
> ----------------------------------------------------------------
> AVR patches queue
>
> - Only reset 'interrupt_request' mask once all interrupts executed
> - Documentation and typo fixes
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/6.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-15 19:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-14 23:46 [PULL 0/4] AVR patches for 2021-03-15 Philippe Mathieu-Daudé
2021-03-14 23:46 ` [PULL 1/4] hw/misc/led: Add yellow LED Philippe Mathieu-Daudé
2021-03-14 23:46 ` [PULL 2/4] hw/avr/arduino: List board schematic links Philippe Mathieu-Daudé
2021-03-14 23:46 ` [PULL 3/4] target/avr: Fix some comment spelling errors Philippe Mathieu-Daudé
2021-03-14 23:46 ` [PULL 4/4] target/avr: Fix interrupt execution Philippe Mathieu-Daudé
2021-03-15 19:22 ` [PULL 0/4] AVR patches for 2021-03-15 Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).