i.MX31: Add initial support
v10 cover i.MX31: Add initial support
Changes since V9: Added MAINTAINERS entry, rebased (and tested)
against git tip.
Peter C
Signature · 2 lines
Dr Peter Chubb peter.chubb AT nicta.com.au http://www.ssrg.nicta.com.au Software Systems Research Group/NICTA
PATCH v10 1/5 i.MX: UART support
Implement the Freescale i.MX UART. This uart is used in a variety of SoCs, including some by Motorola, as well as in the Freescale i.MX series.
This patch gives only a `bare-bones' implementation, enough to run Linux or OKL4, but that's about it.
--- hw/arm/Makefile.objs | 1 hw/imx.h | 16 + hw/imx_serial.c | 467 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 484 insertions(+) create mode 100644 hw/imx_serial.c
hw/arm/Makefile.objs +1 -0
@@ -34,6 +34,7 @@ obj-y += framebuffer.o obj-y += vexpress.o obj-y += strongarm.o obj-y += collie.o +obj-y += imx_serial.o obj-y += pl041.o lm4549.o obj-$(CONFIG_FDT) += ../device_tree.o
hw/imx.h new file +16 -0
@@ -0,0 +1,16 @@ +/* +* i.MX31 emulation +* +* Copyright (C) 2012 Peter Chubb +* NICTA +* +* This code is released under the GPL, version 2.0 or later +* See the file `../COPYING' for details. +*/ + +#ifndef IMX_H +#define IMX_H + +void imx_serial_create (int uart,const target_phys_addr_t addr,qemu_irq irq); + +#endif /* IMX_H */
hw/imx_serial.c new file +467 -0
467 lines not on this page · raw message
PATCH v10 2/5 i.MX31: Clock Control Module
In reply to Peter ChubbFor Linux to be able to work out how fast its clocks are going, so that timer ticks come approximately at the right time, it needs to be able to query the clock control module (CCM).
This is the start of a CCM implementation. It currently knows only about the MCU, HSP and IPG clocks --- i.e., the ones used to feed the periodic and general purpose timers.
--- hw/arm/Makefile.objs | 2 hw/imx.h | 10 + hw/imx_ccm.c | 321 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 332 insertions(+), 1 deletion(-)
hw/arm/Makefile.objs +1 -1
@@ -34,7 +34,7 @@ obj-y += framebuffer.o obj-y += vexpress.o obj-y += strongarm.o obj-y += collie.o -obj-y += imx_serial.o +obj-y += imx_serial.o imx_ccm.o obj-y += pl041.o lm4549.o obj-$(CONFIG_FDT) += ../device_tree.o
hw/imx.h +10 -0
@@ -13,4 +13,14 @@void imx_serial_create (int uart,const target_phys_addr_t addr,qemu_irq irq); +typedef enum { +NOCLK , +MCU , +HSP , +IPG , + CLK_32k +}IMXClk ; + +uint32_t imx_clock_frequency (DeviceState *s,IMXClk clock); +#endif /* IMX_H */
hw/imx_ccm.c new file +321 -0
321 lines not on this page · raw message
PATCH v10 3/5 i.MX31: Timers
In reply to Peter ChubbImplement the timers on the Freescale i.MX31 SoC.
This is not a complete implementation, but gives enough for Linux to boot and run. In particular external triggers, which are not useful under QEMU, are not implemented.
--- hw/arm/Makefile.objs | 2 hw/imx.h | 8 hw/imx_timer.c | 689 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 698 insertions(+), 1 deletion(-) create mode 100644 hw/imx_timer.c
hw/arm/Makefile.objs +1 -1
@@ -34,7 +34,7 @@ obj-y += framebuffer.o obj-y += vexpress.o obj-y += strongarm.o obj-y += collie.o -obj-y += imx_serial.o imx_ccm.o +obj-y += imx_serial.o imx_ccm.o imx_timer.o obj-y += pl041.o lm4549.o obj-$(CONFIG_FDT) += ../device_tree.o
hw/imx.h +8 -0
@@ -23,4 +23,12 @@ typedef enum {uint32_t imx_clock_frequency (DeviceState *s,IMXClk clock); +void imx_timerp_create (const target_phys_addr_t addr, +qemu_irq irq, +DeviceState *ccm); +void imx_timerg_create (const target_phys_addr_t addr, +qemu_irq irq, +DeviceState *ccm); + +#endif /* IMX_H */
hw/imx_timer.c new file +689 -0
689 lines not on this page · raw message
PATCH v10 4/5 i.MX31: Interrupt Controller
In reply to Peter ChubbImplement the Freescale i.MX31 advanced vectored interrupt controller, at least to the extent it is used by Linux 3.x
Vectors are not implemented.
--- hw/arm/Makefile.objs | 2 hw/imx_avic.c | 408 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 409 insertions(+), 1 deletion(-) create mode 100644 hw/imx_avic.c
hw/arm/Makefile.objs +1 -1
@@ -34,7 +34,7 @@ obj-y += framebuffer.o obj-y += vexpress.o obj-y += strongarm.o obj-y += collie.o -obj-y += imx_serial.o imx_ccm.o imx_timer.o +obj-y += imx_serial.o imx_ccm.o imx_timer.o imx_avic.o obj-y += pl041.o lm4549.o obj-$(CONFIG_FDT) += ../device_tree.o
hw/imx_avic.c new file +408 -0
408 lines not on this page · raw message
PATCH v10 5/5 i.MX31: KZM-ARM11-01 evaluation board
In reply to Peter ChubbBoard support for Kyoto Micro's KZM-ARM11-01, an evaluation board built around the Freescale i.MX31.
--- MAINTAINERS | 6 + hw/arm/Makefile.objs | 1 hw/kzm.c | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 hw/kzm.c
MAINTAINERS +6 -0
@@ -207,6 +207,12 @@ M: [email protected] S: Orphan F: hw/gumstix.c +i.MX31 +M: Peter Chubb <[email protected]> +S: Odd fixes +F: hw/imx* +F: hw/kzm.c + Integrator CP M: Paul Brook <[email protected]> M: Peter Maydell <[email protected]>
hw/arm/Makefile.objs +1 -0
@@ -35,6 +35,7 @@ obj-y += vexpress.o obj-y += strongarm.o obj-y += collie.o obj-y += imx_serial.o imx_ccm.o imx_timer.o imx_avic.o +obj-y += kzm.o obj-y += pl041.o lm4549.o obj-$(CONFIG_FDT) += ../device_tree.o
hw/kzm.c new file +154 -0
154 lines not on this page · raw message