Skip to contentSkip to conversation

AT91 Power Management Unit

PATCH In review Filip Navara 1 participant 1 message Jul 15, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/14 AT91 Power Management Unit

The isolated behavior of PMU is emulated completely, but the effects on other parts of the system are not. Since QEMU lacks any API for proper modeling of the system and peripheral clocks, the actual enabling and disabling of clocks has no effect on the emulated system.

The master clock frequency is exposed using a global variable for use by other system components, such as timers.

---
 Makefile.target |    2 +-
 hw/at91.h       |   32 +++++++
 hw/at91_pmc.c   |  280 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 313 insertions(+), 1 deletions(-)
 create mode 100644 hw/at91.h
 create mode 100644 hw/at91_pmc.c
Makefile.target +1 -1
index 4a81e68..ecaba36 100644
@@ -666,7 +666,7 @@ obj-y += framebuffer.o
 obj-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o
 obj-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
 obj-y += syborg_virtio.o
-obj-y += at91_aic.o
+obj-y += at91_aic.o at91_pmc.o
 obj-y += gpio_rotary.o gpio_keypad.o
 CPPFLAGS += -DHAS_AUDIO
 endif
hw/at91.h new file +32 -0
new file mode 100644
index 0000000..9b0c937
@@ -0,0 +1,32 @@
+/*
+ * AT91 Miscellaneous Definitions
+ *
+ * Copyright (c) 2009 Filip Navara
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef AT91_H
+#define AT91_H 1
+
+/* Frequency of the master clock as programmed by the Power Management
+   Controller. */
+extern int at91_master_clock_frequency;
+
+#endif /* !AT91_H */
hw/at91_pmc.c new file +280 -0

280 lines not on this page · raw message

Signature · 1 line
1.6.3.msysgit.0