[6b781c0] | 1 | /*
|
---|
| 2 | * Copyright (c) 2007 Michal Kebrt
|
---|
[6ac14a70] | 3 | * Copyright (c) 2009 Vineeth Pillai
|
---|
[6b781c0] | 4 | * All rights reserved.
|
---|
| 5 | *
|
---|
| 6 | * Redistribution and use in source and binary forms, with or without
|
---|
| 7 | * modification, are permitted provided that the following conditions
|
---|
| 8 | * are met:
|
---|
| 9 | *
|
---|
| 10 | * - Redistributions of source code must retain the above copyright
|
---|
| 11 | * notice, this list of conditions and the following disclaimer.
|
---|
| 12 | * - Redistributions in binary form must reproduce the above copyright
|
---|
| 13 | * notice, this list of conditions and the following disclaimer in the
|
---|
| 14 | * documentation and/or other materials provided with the distribution.
|
---|
| 15 | * - The name of the author may not be used to endorse or promote products
|
---|
| 16 | * derived from this software without specific prior written permission.
|
---|
| 17 | *
|
---|
| 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
| 19 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
| 20 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
| 21 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
| 22 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
| 23 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
| 24 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
| 25 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
| 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
| 27 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
| 28 | */
|
---|
| 29 |
|
---|
| 30 | /** @addtogroup arm32gxemul GXemul
|
---|
| 31 | * @brief GXemul machine specific parts.
|
---|
| 32 | * @ingroup arm32
|
---|
| 33 | * @{
|
---|
| 34 | */
|
---|
| 35 | /** @file
|
---|
| 36 | * @brief GXemul peripheries drivers declarations.
|
---|
| 37 | */
|
---|
| 38 |
|
---|
[66fcba2] | 39 | #ifndef KERN_arm32_testarm_H_
|
---|
| 40 | #define KERN_arm32_testarm_H_
|
---|
[6b781c0] | 41 |
|
---|
[6ac14a70] | 42 | #include <arch/machine_func.h>
|
---|
| 43 |
|
---|
[0e796cc] | 44 | /** Size of GXemul IRQ number range (starting from 0) */
|
---|
| 45 | #define GXEMUL_IRQ_COUNT 32
|
---|
| 46 | #define GXEMUL_KBD_IRQ 2
|
---|
| 47 | #define GXEMUL_TIMER_IRQ 4
|
---|
[6b781c0] | 48 |
|
---|
| 49 | /** Timer frequency */
|
---|
[00287cc] | 50 | #define GXEMUL_TIMER_FREQ 100
|
---|
[6b781c0] | 51 |
|
---|
[00287cc] | 52 | #define GXEMUL_KBD_ADDRESS 0x10000000
|
---|
| 53 | #define GXEMUL_MP_ADDRESS 0x11000000
|
---|
| 54 | #define GXEMUL_FB_ADDRESS 0x12000000
|
---|
| 55 | #define GXEMUL_RTC_ADDRESS 0x15000000
|
---|
| 56 | #define GXEMUL_IRQC_ADDRESS 0x16000000
|
---|
| 57 |
|
---|
| 58 | extern void *gxemul_kbd;
|
---|
| 59 | extern void *gxemul_rtc;
|
---|
| 60 | extern void *gxemul_irqc;
|
---|
| 61 |
|
---|
| 62 | #define GXEMUL_HALT_OFFSET 0x010
|
---|
| 63 | #define GXEMUL_RTC_FREQ_OFFSET 0x100
|
---|
| 64 | #define GXEMUL_MP_MEMSIZE_OFFSET 0x090
|
---|
| 65 | #define GXEMUL_RTC_ACK_OFFSET 0x110
|
---|
[6b781c0] | 66 |
|
---|
[00287cc] | 67 | extern void gxemul_init(void);
|
---|
[6ac14a70] | 68 | extern void gxemul_output_init(void);
|
---|
| 69 | extern void gxemul_input_init(void);
|
---|
| 70 | extern void gxemul_timer_irq_start(void);
|
---|
| 71 | extern void gxemul_cpu_halt(void);
|
---|
[214ec25c] | 72 | extern void gxemul_irq_exception(unsigned int, istate_t *);
|
---|
[12b0d51] | 73 | extern void gxemul_get_memory_extents(uintptr_t *, uintptr_t *);
|
---|
[6ac14a70] | 74 | extern void gxemul_frame_init(void);
|
---|
[ecf083dd] | 75 | extern size_t gxemul_get_irq_count(void);
|
---|
[eff1f033] | 76 | extern const char *gxemul_get_platform_name(void);
|
---|
[6ac14a70] | 77 |
|
---|
[66fcba2] | 78 | extern struct arm_machine_ops gxemul_machine_ops;
|
---|
[6b781c0] | 79 |
|
---|
| 80 | #endif
|
---|
| 81 |
|
---|
| 82 | /** @}
|
---|
| 83 | */
|
---|