Patchwork [v2,2/6] hw/ds1338.c: Add definitions for various flags in the RTC registers.

login
register
mail settings
Submitter Antoine Mathys
Date Dec. 11, 2012, 10:52 p.m.
Message ID <50C7B946.6070709@gmail.com>
Download mbox | patch
Permalink /patch/205331/
State New
Headers show

Comments

Antoine Mathys - Dec. 11, 2012, 10:52 p.m.
Signed-off-by: Antoine Mathys <barsamin@gmail.com>
---
  hw/ds1338.c |    6 ++++++
  1 file changed, 6 insertions(+)
Peter Maydell - Dec. 12, 2012, 12:09 p.m.
On 11 December 2012 22:52, Antoine Mathys <barsamin@gmail.com> wrote:
> Signed-off-by: Antoine Mathys <barsamin@gmail.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

Patch

diff --git a/hw/ds1338.c b/hw/ds1338.c
index faaa4a0..69018bc 100644
--- a/hw/ds1338.c
+++ b/hw/ds1338.c
@@ -17,6 +17,12 @@ 
   */
  #define NVRAM_SIZE 64

+/* Flags definitions */
+#define SECONDS_CH 0x80
+#define HOURS_12   0x40
+#define HOURS_PM   0x20
+#define CTRL_OSF   0x20
+
  typedef struct {
      I2CSlave i2c;
      int64_t offset;