Remove extra CRLF.

This commit is contained in:
Chris Johns
2006-09-11 11:52:08 +00:00
parent c3102eb531
commit 8f1e494813
10 changed files with 3026 additions and 3026 deletions

View File

@@ -1,7 +1,7 @@
#
# $Id$
#
This is the BSP for Nintendo's GBA and GBA SP. The RTEMS Wiki
has more detailed information on this BSP.
#
# $Id$
#
This is the BSP for Nintendo's GBA and GBA SP. The RTEMS Wiki
has more detailed information on this BSP.

View File

@@ -1,23 +1,23 @@
## Process this file with autoconf to produce a configure script.
##
## $Id$
AC_PREREQ(2.59)
AC_INIT([rtems-c-src-lib-libbsp-arm-gba],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
AC_CONFIG_SRCDIR([bsp_specs])
RTEMS_TOP(../../../../../..)
RTEMS_CANONICAL_TARGET_CPU
AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.9])
RTEMS_BSP_CONFIGURE
RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
RTEMS_CANONICALIZE_TOOLS
RTEMS_PROG_CCAS
RTEMS_CHECK_NETWORKING
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
## Process this file with autoconf to produce a configure script.
##
## $Id$
AC_PREREQ(2.59)
AC_INIT([rtems-c-src-lib-libbsp-arm-gba],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
AC_CONFIG_SRCDIR([bsp_specs])
RTEMS_TOP(../../../../../..)
RTEMS_CANONICAL_TARGET_CPU
AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.9])
RTEMS_BSP_CONFIGURE
RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
RTEMS_CANONICALIZE_TOOLS
RTEMS_PROG_CCAS
RTEMS_CHECK_NETWORKING
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View File

@@ -1,5 +1,5 @@
#ifndef __SMC_H__
#define __SMC_H__
#ifndef __SMC_H__
#define __SMC_H__
#ifdef __cplusplus
extern "C" {
@@ -24,5 +24,5 @@ smc_initialize(
#ifdef __cplusplus
}
#endif
#endif
#endif

View File

@@ -1,32 +1,32 @@
/* USC constants */
#ifndef _USC_H__
#define _USC_H__
#define USC_REG_BASE (0x1D000000 | 0xA0000000)
/* Internal register addresses */
#define SYSTEM (USC_REG_BASE + 0x73)
#define INT_CFG0 (USC_REG_BASE + 0xE0)
#define INT_CFG1 (USC_REG_BASE + 0xE4)
#define INT_CFG2 (USC_REG_BASE + 0xE8)
#define INT_STAT (USC_REG_BASE + 0xEC)
#define WD_HBI (USC_REG_BASE + 0xF4)
#define INT_CFG3 (USC_REG_BASE + 0x158)
/* INT_CFGx register masks */
#define HBI_MASK 0x00200000 /* Heartbeat timer interrupt mask */
#define WDI_MASK 0x00400000 /* Watchdog timer interrupt mask */
#define MODE_TOTEM_POLE 0x20000000 /* Totem Pole Output Mode */
/* WD_HBI register bits */
#define WD_EN 0x00800000 /* Watchdog enable */
#define HBI_4000_PS 0x00200000 /* Heartbeat timer prescaler = 4000 */
#define WD_INIT 0x10 /* Watchdog reset pattern (written to byte 2 in WD_HBI register) */
#endif /* _USC_H__ */
/* USC constants */
#ifndef _USC_H__
#define _USC_H__
#define USC_REG_BASE (0x1D000000 | 0xA0000000)
/* Internal register addresses */
#define SYSTEM (USC_REG_BASE + 0x73)
#define INT_CFG0 (USC_REG_BASE + 0xE0)
#define INT_CFG1 (USC_REG_BASE + 0xE4)
#define INT_CFG2 (USC_REG_BASE + 0xE8)
#define INT_STAT (USC_REG_BASE + 0xEC)
#define WD_HBI (USC_REG_BASE + 0xF4)
#define INT_CFG3 (USC_REG_BASE + 0x158)
/* INT_CFGx register masks */
#define HBI_MASK 0x00200000 /* Heartbeat timer interrupt mask */
#define WDI_MASK 0x00400000 /* Watchdog timer interrupt mask */
#define MODE_TOTEM_POLE 0x20000000 /* Totem Pole Output Mode */
/* WD_HBI register bits */
#define WD_EN 0x00800000 /* Watchdog enable */
#define HBI_4000_PS 0x00200000 /* Heartbeat timer prescaler = 4000 */
#define WD_INIT 0x10 /* Watchdog reset pattern (written to byte 2 in WD_HBI register) */
#endif /* _USC_H__ */

View File

@@ -1,45 +1,45 @@
/* NIOS2 crtn.asm fix
*
* COPYRIGHT (c) 2005-2006 Kolja Waschk rtemsdev/ixo.de
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
/* Can't use the original crtn.asm from Altera because it doesn't
restore the stack pointer correctly (in 5.1b73, the stack pointer
is further decreased by 48 instead of increased). This is named
differently (crtnn instead crtn) to make sure it can be picked up
using custom gcc specs instead of gcc's crtn. - kawk */
.section .init
ldw ra, 44(sp)
ldw r23, 40(sp)
ldw r22, 36(sp)
ldw r21, 32(sp)
ldw r20, 28(sp)
ldw r19, 24(sp)
ldw r18, 20(sp)
ldw r17, 16(sp)
ldw r16, 12(sp)
ldw fp, 8(sp)
addi sp, sp, 48
ret
.section .fini
ldw ra, 44(sp)
ldw r23, 40(sp)
ldw r22, 36(sp)
ldw r21, 32(sp)
ldw r20, 28(sp)
ldw r19, 24(sp)
ldw r18, 20(sp)
ldw r17, 16(sp)
ldw r16, 12(sp)
ldw fp, 8(sp)
addi sp, sp, 48
ret
/* NIOS2 crtn.asm fix
*
* COPYRIGHT (c) 2005-2006 Kolja Waschk rtemsdev/ixo.de
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
/* Can't use the original crtn.asm from Altera because it doesn't
restore the stack pointer correctly (in 5.1b73, the stack pointer
is further decreased by 48 instead of increased). This is named
differently (crtnn instead crtn) to make sure it can be picked up
using custom gcc specs instead of gcc's crtn. - kawk */
.section .init
ldw ra, 44(sp)
ldw r23, 40(sp)
ldw r22, 36(sp)
ldw r21, 32(sp)
ldw r20, 28(sp)
ldw r19, 24(sp)
ldw r18, 20(sp)
ldw r17, 16(sp)
ldw r16, 12(sp)
ldw fp, 8(sp)
addi sp, sp, 48
ret
.section .fini
ldw ra, 44(sp)
ldw r23, 40(sp)
ldw r22, 36(sp)
ldw r21, 32(sp)
ldw r20, 28(sp)
ldw r19, 24(sp)
ldw r18, 20(sp)
ldw r17, 16(sp)
ldw r16, 12(sp)
ldw fp, 8(sp)
addi sp, sp, 48
ret

View File

@@ -1,189 +1,189 @@
#
# Timing Test Suite Results for this BSP on the MCP750
#
# $Id$
#
Thanks to Eric Valette <valette@crf.canon.fr> for running the timing
tests and reporting this information.
Target: 300 Mhz MCP750
CPU: MPC750
Clock Speed: 300 Mhz
Times are reported in nanoseconds.
Context Switch
context switch: self_______________________________________________0.708
context switch: to another task____________________________________0.649
context switch: no floating point contexts_________________________2.360
fp context switch: restore 1st FP task_____________________________6.490
fp context switch: save initialized, restore initialized___________0.767
fp context switch: save idle, restore initialized__________________0.885
fp context switch: save idle, restore idle_________________________6.195
Task Manager
rtems_task_create__________________________________________________4.003
rtems_task_ident___________________________________________________4.995
rtems_task_start___________________________________________________1.587
rtems_task_restart: calling task___________________________________1.788
rtems_task_restart: suspended task -- returns to caller____________1.849
rtems_task_restart: blocked task -- returns to caller______________2.082
rtems_task_restart: ready task -- returns to caller________________1.863
rtems_task_restart: suspended task -- preempts caller______________3.102
rtems_task_restart: blocked task -- preempts caller_______________12.744
rtems_task_restart: ready task -- preempts caller__________________3.009
rtems_task_delete: calling task____________________________________6.592
rtems_task_delete: suspended task__________________________________3.460
rtems_task_delete: blocked task____________________________________3.555
rtems_task_delete: ready task______________________________________3.797
rtems_task_suspend: calling task___________________________________3.066
rtems_task_suspend: returns to caller______________________________0.774
rtems_task_resume: task readied -- returns to caller_______________0.733
rtems_task_resume: task readied -- preempts caller_________________1.634
rtems_task_set_priority: obtain current priority___________________0.524
rtems_task_set_priority: returns to caller_________________________0.970
rtems_task_set_priority: preempts caller___________________________3.686
rtems_task_mode: obtain current mode_______________________________0.233
rtems_task_mode: no reschedule_____________________________________0.231
rtems_task_mode: reschedule -- returns to caller___________________1.711
rtems_task_mode: reschedule -- preempts caller_____________________3.304
rtems_task_get_note________________________________________________0.549
rtems_task_set_note________________________________________________0.548
rtems_task_wake_after: yield -- returns to caller__________________3.063
rtems_task_wake_after: yields -- preempts caller___________________3.063
rtems_task_wake_when_______________________________________________3.906
Interrupt Manager
interrupt entry overhead: returns to nested interrupt______________1.947
interrupt entry overhead: returns to interrupted task______________2.891
interrupt entry overhead: returns to preempting task_______________0.767
interrupt exit overhead: returns to nested interrupt_______________0.177
interrupt exit overhead: returns to interrupted task_______________0.885
interrupt exit overhead: returns to preempting task________________2.950
Clock Manager
rtems_clock_set____________________________________________________1.380
rtems_clock_get____________________________________________________0.164
rtems_clock_tick___________________________________________________5.487
Timer Manager
rtems_timer_create_________________________________________________0.959
rtems_timer_ident__________________________________________________4.822
rtems_timer_delete: inactive_______________________________________0.749
rtems_timer_delete: active_________________________________________0.815
rtems_timer_fire_after: inactive___________________________________1.047
rtems_timer_fire_after: active_____________________________________0.951
rtems_timer_fire_when: inactive____________________________________1.145
rtems_timer_fire_when: active______________________________________1.133
rtems_timer_reset: inactive________________________________________0.848
rtems_timer_reset: active__________________________________________0.892
rtems_timer_cancel: inactive_______________________________________0.500
rtems_timer_cancel: active_________________________________________0.552
Semaphore Manager
rtems_semaphore_create 4.248
rtems_semaphore_ident______________________________________________5.614
rtems_semaphore_delete_____________________________________________3.953
rtems_semaphore_obtain: available__________________________________0.639
rtems_semaphore_obtain: not available -- NO_WAIT___________________0.638
rtems_semaphore_obtain: not available -- caller blocks_____________3.914
rtems_semaphore_release: no waiting tasks__________________________0.825
rtems_semaphore_release: task readied -- returns to caller_________1.175
rtems_semaphore_release: task readied -- preempts caller___________2.789
Message Queue Manager
rtems_message_queue_create________________________________________48.380
rtems_message_queue_ident__________________________________________4.936
rtems_message_queue_delete_________________________________________2.891
rtems_message_queue_send: no waiting tasks_________________________1.149
rtems_message_queue_send: task readied -- returns to caller________1.489
rtems_message_queue_send: task readied -- preempts caller__________3.000
rtems_message_queue_urgent: no waiting tasks_______________________1.145
rtems_message_queue_urgent: task readied -- returns to caller______1.508
rtems_message_queue_urgent: task readied -- preempts caller________2.961
rtems_message_queue_broadcast: no waiting tasks____________________0.866
rtems_message_queue_broadcast: task readied -- returns to caller___9.735
rtems_message_queue_broadcast: task readied -- preempts caller_____2.891
rtems_message_queue_receive: available_____________________________0.874
rtems_message_queue_receive: not available -- NO_WAIT______________0.757
rtems_message_queue_receive: not available -- caller blocks________4.091
rtems_message_queue_flush: no messages flushed_____________________0.554
rtems_message_queue_flush: messages flushed________________________0.605
Event Manager
rtems_event_send: no task readied__________________________________0.542
rtems_event_send: task readied -- returns to caller________________1.196
rtems_event_send: task readied -- preempts caller__________________2.558
rtems_event_receive: obtain current events_________________________0.082
rtems_event_receive: available_____________________________________0.590
rtems_event_receive: not available -- NO_WAIT______________________0.551
rtems_event_receive: not available -- caller blocks________________3.545
Signal Manager
rtems_signal_catch_________________________________________________0.944
rtems_signal_send: returns to caller_______________________________3.186
rtems_signal_send: signal to self__________________________________5.959
exit ASR overhead: returns to calling task_________________________2.950
exit ASR overhead: returns to preempting task______________________1.180
Partition Manager
rtems_partition_create____________________________________________17.464
rtems_partition_ident______________________________________________4.810
rtems_partition_delete_____________________________________________1.475
rtems_partition_get_buffer: available______________________________3.304
rtems_partition_get_buffer: not available__________________________0.472
rtems_partition_return_buffer______________________________________1.947
Region Manager
rtems_region_create________________________________________________4.425
rtems_region_ident_________________________________________________4.917
rtems_region_delete________________________________________________1.829
rtems_region_get_segment: available________________________________1.121
rtems_region_get_segment: not available -- NO_WAIT_________________1.770
rtems_region_get_segment: not available -- caller blocks___________6.667
rtems_region_return_segment: no waiting tasks______________________0.944
rtems_region_return_segment: task readied -- returns to caller_____1.298
rtems_region_return_segment: task readied -- preempts caller_______9.322
Dual-Ported Memory Manager
rtems_port_create__________________________________________________6.372
rtems_port_ident___________________________________________________4.803
rtems_port_delete__________________________________________________3.245
rtems_port_internal_to_external____________________________________0.490
rtems_port_external_to_internal____________________________________0.502
IO Manager
rtems_io_initialize________________________________________________0.090
rtems_io_open______________________________________________________0.075
rtems_io_close_____________________________________________________0.086
rtems_io_read______________________________________________________0.069
rtems_io_write_____________________________________________________0.082
rtems_io_control___________________________________________________0.081
Rate Monotonic Manager
rtems_rate_monotonic_create________________________________________7.080
rtems_rate_monotonic_ident_________________________________________4.814
rtems_rate_monotonic_cancel________________________________________5.369
rtems_rate_monotonic_delete: active________________________________1.121
rtems_rate_monotonic_delete: inactive______________________________4.248
rtems_rate_monotonic_period: obtain status_________________________2.419
rtems_rate_monotonic_period: initiate period -- returns to caller__9.204
rtems_rate_monotonic_period: conclude periods -- caller blocks_____2.131
#
# Timing Test Suite Results for this BSP on the MCP750
#
# $Id$
#
Thanks to Eric Valette <valette@crf.canon.fr> for running the timing
tests and reporting this information.
Target: 300 Mhz MCP750
CPU: MPC750
Clock Speed: 300 Mhz
Times are reported in nanoseconds.
Context Switch
context switch: self_______________________________________________0.708
context switch: to another task____________________________________0.649
context switch: no floating point contexts_________________________2.360
fp context switch: restore 1st FP task_____________________________6.490
fp context switch: save initialized, restore initialized___________0.767
fp context switch: save idle, restore initialized__________________0.885
fp context switch: save idle, restore idle_________________________6.195
Task Manager
rtems_task_create__________________________________________________4.003
rtems_task_ident___________________________________________________4.995
rtems_task_start___________________________________________________1.587
rtems_task_restart: calling task___________________________________1.788
rtems_task_restart: suspended task -- returns to caller____________1.849
rtems_task_restart: blocked task -- returns to caller______________2.082
rtems_task_restart: ready task -- returns to caller________________1.863
rtems_task_restart: suspended task -- preempts caller______________3.102
rtems_task_restart: blocked task -- preempts caller_______________12.744
rtems_task_restart: ready task -- preempts caller__________________3.009
rtems_task_delete: calling task____________________________________6.592
rtems_task_delete: suspended task__________________________________3.460
rtems_task_delete: blocked task____________________________________3.555
rtems_task_delete: ready task______________________________________3.797
rtems_task_suspend: calling task___________________________________3.066
rtems_task_suspend: returns to caller______________________________0.774
rtems_task_resume: task readied -- returns to caller_______________0.733
rtems_task_resume: task readied -- preempts caller_________________1.634
rtems_task_set_priority: obtain current priority___________________0.524
rtems_task_set_priority: returns to caller_________________________0.970
rtems_task_set_priority: preempts caller___________________________3.686
rtems_task_mode: obtain current mode_______________________________0.233
rtems_task_mode: no reschedule_____________________________________0.231
rtems_task_mode: reschedule -- returns to caller___________________1.711
rtems_task_mode: reschedule -- preempts caller_____________________3.304
rtems_task_get_note________________________________________________0.549
rtems_task_set_note________________________________________________0.548
rtems_task_wake_after: yield -- returns to caller__________________3.063
rtems_task_wake_after: yields -- preempts caller___________________3.063
rtems_task_wake_when_______________________________________________3.906
Interrupt Manager
interrupt entry overhead: returns to nested interrupt______________1.947
interrupt entry overhead: returns to interrupted task______________2.891
interrupt entry overhead: returns to preempting task_______________0.767
interrupt exit overhead: returns to nested interrupt_______________0.177
interrupt exit overhead: returns to interrupted task_______________0.885
interrupt exit overhead: returns to preempting task________________2.950
Clock Manager
rtems_clock_set____________________________________________________1.380
rtems_clock_get____________________________________________________0.164
rtems_clock_tick___________________________________________________5.487
Timer Manager
rtems_timer_create_________________________________________________0.959
rtems_timer_ident__________________________________________________4.822
rtems_timer_delete: inactive_______________________________________0.749
rtems_timer_delete: active_________________________________________0.815
rtems_timer_fire_after: inactive___________________________________1.047
rtems_timer_fire_after: active_____________________________________0.951
rtems_timer_fire_when: inactive____________________________________1.145
rtems_timer_fire_when: active______________________________________1.133
rtems_timer_reset: inactive________________________________________0.848
rtems_timer_reset: active__________________________________________0.892
rtems_timer_cancel: inactive_______________________________________0.500
rtems_timer_cancel: active_________________________________________0.552
Semaphore Manager
rtems_semaphore_create 4.248
rtems_semaphore_ident______________________________________________5.614
rtems_semaphore_delete_____________________________________________3.953
rtems_semaphore_obtain: available__________________________________0.639
rtems_semaphore_obtain: not available -- NO_WAIT___________________0.638
rtems_semaphore_obtain: not available -- caller blocks_____________3.914
rtems_semaphore_release: no waiting tasks__________________________0.825
rtems_semaphore_release: task readied -- returns to caller_________1.175
rtems_semaphore_release: task readied -- preempts caller___________2.789
Message Queue Manager
rtems_message_queue_create________________________________________48.380
rtems_message_queue_ident__________________________________________4.936
rtems_message_queue_delete_________________________________________2.891
rtems_message_queue_send: no waiting tasks_________________________1.149
rtems_message_queue_send: task readied -- returns to caller________1.489
rtems_message_queue_send: task readied -- preempts caller__________3.000
rtems_message_queue_urgent: no waiting tasks_______________________1.145
rtems_message_queue_urgent: task readied -- returns to caller______1.508
rtems_message_queue_urgent: task readied -- preempts caller________2.961
rtems_message_queue_broadcast: no waiting tasks____________________0.866
rtems_message_queue_broadcast: task readied -- returns to caller___9.735
rtems_message_queue_broadcast: task readied -- preempts caller_____2.891
rtems_message_queue_receive: available_____________________________0.874
rtems_message_queue_receive: not available -- NO_WAIT______________0.757
rtems_message_queue_receive: not available -- caller blocks________4.091
rtems_message_queue_flush: no messages flushed_____________________0.554
rtems_message_queue_flush: messages flushed________________________0.605
Event Manager
rtems_event_send: no task readied__________________________________0.542
rtems_event_send: task readied -- returns to caller________________1.196
rtems_event_send: task readied -- preempts caller__________________2.558
rtems_event_receive: obtain current events_________________________0.082
rtems_event_receive: available_____________________________________0.590
rtems_event_receive: not available -- NO_WAIT______________________0.551
rtems_event_receive: not available -- caller blocks________________3.545
Signal Manager
rtems_signal_catch_________________________________________________0.944
rtems_signal_send: returns to caller_______________________________3.186
rtems_signal_send: signal to self__________________________________5.959
exit ASR overhead: returns to calling task_________________________2.950
exit ASR overhead: returns to preempting task______________________1.180
Partition Manager
rtems_partition_create____________________________________________17.464
rtems_partition_ident______________________________________________4.810
rtems_partition_delete_____________________________________________1.475
rtems_partition_get_buffer: available______________________________3.304
rtems_partition_get_buffer: not available__________________________0.472
rtems_partition_return_buffer______________________________________1.947
Region Manager
rtems_region_create________________________________________________4.425
rtems_region_ident_________________________________________________4.917
rtems_region_delete________________________________________________1.829
rtems_region_get_segment: available________________________________1.121
rtems_region_get_segment: not available -- NO_WAIT_________________1.770
rtems_region_get_segment: not available -- caller blocks___________6.667
rtems_region_return_segment: no waiting tasks______________________0.944
rtems_region_return_segment: task readied -- returns to caller_____1.298
rtems_region_return_segment: task readied -- preempts caller_______9.322
Dual-Ported Memory Manager
rtems_port_create__________________________________________________6.372
rtems_port_ident___________________________________________________4.803
rtems_port_delete__________________________________________________3.245
rtems_port_internal_to_external____________________________________0.490
rtems_port_external_to_internal____________________________________0.502
IO Manager
rtems_io_initialize________________________________________________0.090
rtems_io_open______________________________________________________0.075
rtems_io_close_____________________________________________________0.086
rtems_io_read______________________________________________________0.069
rtems_io_write_____________________________________________________0.082
rtems_io_control___________________________________________________0.081
Rate Monotonic Manager
rtems_rate_monotonic_create________________________________________7.080
rtems_rate_monotonic_ident_________________________________________4.814
rtems_rate_monotonic_cancel________________________________________5.369
rtems_rate_monotonic_delete: active________________________________1.121
rtems_rate_monotonic_delete: inactive______________________________4.248
rtems_rate_monotonic_period: obtain status_________________________2.419
rtems_rate_monotonic_period: initiate period -- returns to caller__9.204
rtems_rate_monotonic_period: conclude periods -- caller blocks_____2.131

View File

@@ -427,177 +427,177 @@
}
/* Wait until rINTPND is changed for the case that the ISR is very short. */
//////////////////////////////////////////////////////////////////////////////
// Typedefs //
//////////////////////////////////////////////////////////////////////////////
typedef union {
struct _reg {
unsigned STOP_BIT:1; // Enters STOP mode. This bit isn't be cleared automatically.
unsigned SL_IDLE:1; // SL_IDLE mode option. This bit isn't be cleared automatically. To enter SL_IDLE mode, CLKCON register has to be 0xe.
unsigned IDLE_BIT:1; // Enters IDLE mode. This bit isn't be cleared automatically.
unsigned LCDC:1; // Controls HCLK into LCDC block
unsigned USB_host:1; // Controls HCLK into USB host block
unsigned USB_device:1; // Controls PCLK into USB device block
unsigned PWMTIMER:1; // Controls PCLK into PWMTIMER block
unsigned MMC:1; // Controls PCLK into MMC interface block
unsigned UART0:1; // Controls PCLK into UART0 block
unsigned UART1:1; // Controls PCLK into UART1 block
unsigned GPIO:1; // Controls PCLK into GPIO block
unsigned RTC:1; // Controls PCLK into RTC control block. Even if this bit is cleared to 0, RTC timer is alive.
unsigned ADC:1; // Controls PCLK into ADC block
unsigned IIC:1; // Controls PCLK into IIC block
unsigned IIS:1; // Controls PCLK into IIS block
unsigned SPI:1; // Controls PCLK into SPI block
} reg;
unsigned long all;
} CLKCON;
typedef union
{
struct {
unsigned ENVID:1; // LCD video output and the logic 1=enable/0=disable.
unsigned BPPMODE:4; // 1011 = 8 bpp for TFT, 1100 = 16 bpp for TFT, 1110 = 16 bpp TFT skipmode
unsigned PNRMODE:2; // TFT: 3
unsigned MMODE:1; // This bit determines the toggle rate of the VM. 0 = Each Frame, 1 = The rate defined by the MVAL
unsigned CLKVAL:10; // TFT: VCLK = HCLK / [(CLKVAL+1) x 2] (CLKVAL >= 1)
unsigned LINECNT:10; // (read only) These bits provide the status of the line counter. Down count from LINEVAL to 0
} reg;
unsigned long all;
} LCDCON1;
typedef union {
struct {
unsigned VSPW:6; // TFT: Vertical sync pulse width determines the VSYNC pulse's high level width by counting the number of inactive lines.
unsigned VFPD:8; // TFT: Vertical front porch is the number of inactive lines at the end of a frame, before vertical synchronization period.
unsigned LINEVAL:10; // TFT/STN: These bits determine the vertical size of LCD panel.
unsigned VBPD:8; // TFT: Vertical back porch is the number of inactive lines at the start of a frame, after vertical synchronization period.
} reg;
unsigned long all;
} LCDCON2;
typedef union {
struct {
unsigned HFPD:8; // TFT: Horizontal front porch is the number of VCLK periods between the end of active data and the rising edge of HSYNC.
unsigned HOZVAL:11; // TFT/STN: These bits determine the horizontal size of LCD panel. 2n bytes.
unsigned HBPD:7; // TFT: Horizontal back porch is the number of VCLK periods between the falling edge of HSYNC and the start of active data.
} reg;
unsigned long all;
} LCDCON3;
typedef union {
struct {
unsigned HSPW:8; // TFT: Horizontal sync pulse width determines the HSYNC pulse's high level width by counting the number of the VCLK.
unsigned MVAL:8; // STN:
unsigned ADDVAL:8; // TFT: Palette Index offset value
unsigned PALADDEN:1; // TFT: Palette Index offset enable. 0 = Disable 1 = Enable
} reg;
unsigned long all;
} LCDCON4;
typedef union {
struct {
unsigned HWSWP:1; // STN/TFT: Half-Word swap control bit. 0 = Swap Disable 1 = Swap Enable
unsigned BSWP:1; // STN/TFT: Byte swap control bit. 0 = Swap Disable 1 = Swap Enable
unsigned ENLEND:1; // TFT: LEND output signal enable/disable. 0 = Disable LEND signal. 1 = Enable LEND signal
unsigned RESERVED1:1;
unsigned INVENDLINE:1; // TFT: This bit indicates the LEND signal polarity. 0 = normal 1 = inverted
unsigned RESERVED2:1;
unsigned INVVDEN:1; // TFT: This bit indicates the VDEN signal polarity. 0 = normal 1 = inverted
unsigned INVVD:1; // STN/TFT: This bit indicates the VD (video data) pulse polarity. 0 = Normal. 1 = VD is inverted.
unsigned INVVFRAME:1; // STN/TFT: This bit indicates the VFRAME/VSYNC pulse polarity. 0 = normal 1 = inverted
unsigned INVVLINE:1; // STN/TFT: This bit indicates the VLINE/HSYNC pulse polarity. 0 = normal 1 = inverted
unsigned INVVCLK:1; // STN/TFT: This bit controls the polarity of the VCLK active edge. 0 = The video data is fetched at VCLK falling edge. 1 = The video data is fetched at VCLK rising edge
unsigned RESERVED3:2;
unsigned SELFREF:1; // STN:
unsigned SLOWCLKSYNC:1; // STN:
unsigned RESERVED4:2; // must be 0
unsigned HSTATUS:2; // TFT: Horizontal Status (Read only) 00 = HSYNC 01 = BACK Porch. 10 = ACTIVE 11 = FRONT Porch
unsigned VSTATUS:2; // TFT: Vertical Status (Read only). 00 = VSYNC 01 = BACK Porch. 10 = ACTIVE 11 = FRONT Porch
} reg;
unsigned long all;
} LCDCON5;
typedef union {
struct {
unsigned LCDBASEU:21; // For single-scan LCD: These bits indicate A[21:1] of the start address of the LCD frame buffer.
unsigned LCDBANK:7; // A[28:22]
} reg;
unsigned long all;
} LCDSADDR1;
typedef union {
struct {
unsigned LCDBASEL:21; // For single scan LCD: These bits indicate A[21:1] of the end address of the LCD frame buffer. LCDBASEL = ((the fame end address) >>1) + 1 = LCDBASEU + (PAGEWIDTH+OFFSIZE)x(LINEVAL+1)
} reg;
unsigned long all;
} LCDSADDR2;
typedef union {
struct {
unsigned PAGEWIDTH:11; // Virtual screen page width(the number of half words) This value defines the width of the view port in the frame
unsigned OFFSIZE:11; // Virtual screen offset size(the number of half words) This value defines the difference between the address of the last half word displayed on the previous LCD line and the address of the first half word to be displayed in the new LCD line.
} reg;
unsigned long all;
} LCDSADDR3;
//
//
//
typedef union {
struct {
unsigned IISIFENA:1; // IIS interface enable (start)
unsigned IISPSENA:1; // IIS prescaler enable
unsigned RXCHIDLE:1; // Receive channel idle command
unsigned TXCHIDLE:1; // Transmit channel idle command
unsigned RXDMAENA:1; // Receive DMA service request enable
unsigned TXDMAENA:1; // Transmit DMA service request enable
unsigned RXFIFORDY:1; // Receive FIFO ready flag (read only)
unsigned TXFIFORDY:1; // Transmit FIFO ready flag (read only)
unsigned LRINDEX:1; // Left/right channel index (read only)
} reg;
unsigned long all;
} IISCON;
typedef union {
struct {
unsigned SBCLKFS:2; // Serial bit clock frequency select
unsigned MCLKFS:1; // Master clock frequency select
unsigned SDBITS:1; // Serial data bit per channel
unsigned SIFMT:1; // Serial interface format
unsigned ACTLEVCH:1; // Active level pf left/right channel
unsigned TXRXMODE:2; // Transmit/receive mode select
unsigned MODE:1; // Master/slave mode select
} reg;
unsigned long all;
} IISMOD;
typedef union {
struct {
unsigned PSB:5; // Prescaler control B
unsigned PSA:5; // Prescaler control A
} reg;
unsigned long all;
} IISPSR;
typedef union {
struct {
unsigned RXFIFOCNT:4; // (read only)
unsigned TXFIFOCNT:4; // (read only)
unsigned RXFIFOENA:1; //
unsigned TXFIFOENA:1; //
unsigned RXFIFOMODE:1; //
unsigned TXFIFOMODE:1; //
} reg;
unsigned long all;
} IISSFIFCON;
typedef union {
struct {
unsigned FENTRY:16; //
} reg;
unsigned long all;
} IISSFIF;
//////////////////////////////////////////////////////////////////////////////
// Typedefs //
//////////////////////////////////////////////////////////////////////////////
typedef union {
struct _reg {
unsigned STOP_BIT:1; // Enters STOP mode. This bit isn't be cleared automatically.
unsigned SL_IDLE:1; // SL_IDLE mode option. This bit isn't be cleared automatically. To enter SL_IDLE mode, CLKCON register has to be 0xe.
unsigned IDLE_BIT:1; // Enters IDLE mode. This bit isn't be cleared automatically.
unsigned LCDC:1; // Controls HCLK into LCDC block
unsigned USB_host:1; // Controls HCLK into USB host block
unsigned USB_device:1; // Controls PCLK into USB device block
unsigned PWMTIMER:1; // Controls PCLK into PWMTIMER block
unsigned MMC:1; // Controls PCLK into MMC interface block
unsigned UART0:1; // Controls PCLK into UART0 block
unsigned UART1:1; // Controls PCLK into UART1 block
unsigned GPIO:1; // Controls PCLK into GPIO block
unsigned RTC:1; // Controls PCLK into RTC control block. Even if this bit is cleared to 0, RTC timer is alive.
unsigned ADC:1; // Controls PCLK into ADC block
unsigned IIC:1; // Controls PCLK into IIC block
unsigned IIS:1; // Controls PCLK into IIS block
unsigned SPI:1; // Controls PCLK into SPI block
} reg;
unsigned long all;
} CLKCON;
typedef union
{
struct {
unsigned ENVID:1; // LCD video output and the logic 1=enable/0=disable.
unsigned BPPMODE:4; // 1011 = 8 bpp for TFT, 1100 = 16 bpp for TFT, 1110 = 16 bpp TFT skipmode
unsigned PNRMODE:2; // TFT: 3
unsigned MMODE:1; // This bit determines the toggle rate of the VM. 0 = Each Frame, 1 = The rate defined by the MVAL
unsigned CLKVAL:10; // TFT: VCLK = HCLK / [(CLKVAL+1) x 2] (CLKVAL >= 1)
unsigned LINECNT:10; // (read only) These bits provide the status of the line counter. Down count from LINEVAL to 0
} reg;
unsigned long all;
} LCDCON1;
typedef union {
struct {
unsigned VSPW:6; // TFT: Vertical sync pulse width determines the VSYNC pulse's high level width by counting the number of inactive lines.
unsigned VFPD:8; // TFT: Vertical front porch is the number of inactive lines at the end of a frame, before vertical synchronization period.
unsigned LINEVAL:10; // TFT/STN: These bits determine the vertical size of LCD panel.
unsigned VBPD:8; // TFT: Vertical back porch is the number of inactive lines at the start of a frame, after vertical synchronization period.
} reg;
unsigned long all;
} LCDCON2;
typedef union {
struct {
unsigned HFPD:8; // TFT: Horizontal front porch is the number of VCLK periods between the end of active data and the rising edge of HSYNC.
unsigned HOZVAL:11; // TFT/STN: These bits determine the horizontal size of LCD panel. 2n bytes.
unsigned HBPD:7; // TFT: Horizontal back porch is the number of VCLK periods between the falling edge of HSYNC and the start of active data.
} reg;
unsigned long all;
} LCDCON3;
typedef union {
struct {
unsigned HSPW:8; // TFT: Horizontal sync pulse width determines the HSYNC pulse's high level width by counting the number of the VCLK.
unsigned MVAL:8; // STN:
unsigned ADDVAL:8; // TFT: Palette Index offset value
unsigned PALADDEN:1; // TFT: Palette Index offset enable. 0 = Disable 1 = Enable
} reg;
unsigned long all;
} LCDCON4;
typedef union {
struct {
unsigned HWSWP:1; // STN/TFT: Half-Word swap control bit. 0 = Swap Disable 1 = Swap Enable
unsigned BSWP:1; // STN/TFT: Byte swap control bit. 0 = Swap Disable 1 = Swap Enable
unsigned ENLEND:1; // TFT: LEND output signal enable/disable. 0 = Disable LEND signal. 1 = Enable LEND signal
unsigned RESERVED1:1;
unsigned INVENDLINE:1; // TFT: This bit indicates the LEND signal polarity. 0 = normal 1 = inverted
unsigned RESERVED2:1;
unsigned INVVDEN:1; // TFT: This bit indicates the VDEN signal polarity. 0 = normal 1 = inverted
unsigned INVVD:1; // STN/TFT: This bit indicates the VD (video data) pulse polarity. 0 = Normal. 1 = VD is inverted.
unsigned INVVFRAME:1; // STN/TFT: This bit indicates the VFRAME/VSYNC pulse polarity. 0 = normal 1 = inverted
unsigned INVVLINE:1; // STN/TFT: This bit indicates the VLINE/HSYNC pulse polarity. 0 = normal 1 = inverted
unsigned INVVCLK:1; // STN/TFT: This bit controls the polarity of the VCLK active edge. 0 = The video data is fetched at VCLK falling edge. 1 = The video data is fetched at VCLK rising edge
unsigned RESERVED3:2;
unsigned SELFREF:1; // STN:
unsigned SLOWCLKSYNC:1; // STN:
unsigned RESERVED4:2; // must be 0
unsigned HSTATUS:2; // TFT: Horizontal Status (Read only) 00 = HSYNC 01 = BACK Porch. 10 = ACTIVE 11 = FRONT Porch
unsigned VSTATUS:2; // TFT: Vertical Status (Read only). 00 = VSYNC 01 = BACK Porch. 10 = ACTIVE 11 = FRONT Porch
} reg;
unsigned long all;
} LCDCON5;
typedef union {
struct {
unsigned LCDBASEU:21; // For single-scan LCD: These bits indicate A[21:1] of the start address of the LCD frame buffer.
unsigned LCDBANK:7; // A[28:22]
} reg;
unsigned long all;
} LCDSADDR1;
typedef union {
struct {
unsigned LCDBASEL:21; // For single scan LCD: These bits indicate A[21:1] of the end address of the LCD frame buffer. LCDBASEL = ((the fame end address) >>1) + 1 = LCDBASEU + (PAGEWIDTH+OFFSIZE)x(LINEVAL+1)
} reg;
unsigned long all;
} LCDSADDR2;
typedef union {
struct {
unsigned PAGEWIDTH:11; // Virtual screen page width(the number of half words) This value defines the width of the view port in the frame
unsigned OFFSIZE:11; // Virtual screen offset size(the number of half words) This value defines the difference between the address of the last half word displayed on the previous LCD line and the address of the first half word to be displayed in the new LCD line.
} reg;
unsigned long all;
} LCDSADDR3;
//
//
//
typedef union {
struct {
unsigned IISIFENA:1; // IIS interface enable (start)
unsigned IISPSENA:1; // IIS prescaler enable
unsigned RXCHIDLE:1; // Receive channel idle command
unsigned TXCHIDLE:1; // Transmit channel idle command
unsigned RXDMAENA:1; // Receive DMA service request enable
unsigned TXDMAENA:1; // Transmit DMA service request enable
unsigned RXFIFORDY:1; // Receive FIFO ready flag (read only)
unsigned TXFIFORDY:1; // Transmit FIFO ready flag (read only)
unsigned LRINDEX:1; // Left/right channel index (read only)
} reg;
unsigned long all;
} IISCON;
typedef union {
struct {
unsigned SBCLKFS:2; // Serial bit clock frequency select
unsigned MCLKFS:1; // Master clock frequency select
unsigned SDBITS:1; // Serial data bit per channel
unsigned SIFMT:1; // Serial interface format
unsigned ACTLEVCH:1; // Active level pf left/right channel
unsigned TXRXMODE:2; // Transmit/receive mode select
unsigned MODE:1; // Master/slave mode select
} reg;
unsigned long all;
} IISMOD;
typedef union {
struct {
unsigned PSB:5; // Prescaler control B
unsigned PSA:5; // Prescaler control A
} reg;
unsigned long all;
} IISPSR;
typedef union {
struct {
unsigned RXFIFOCNT:4; // (read only)
unsigned TXFIFOCNT:4; // (read only)
unsigned RXFIFOENA:1; //
unsigned TXFIFOENA:1; //
unsigned RXFIFOMODE:1; //
unsigned TXFIFOMODE:1; //
} reg;
unsigned long all;
} IISSFIFCON;
typedef union {
struct {
unsigned FENTRY:16; //
} reg;
unsigned long all;
} IISSFIF;
#define LCD_WIDTH 240

File diff suppressed because it is too large Load Diff

View File

@@ -1,41 +1,41 @@
/*
* $Id$
*
* RTEMS CS8900 Driver Setup for the DIMM-PC/i386 made by Kontron.
*
* Port to the DIMM PC copyright (c) 2004 Angelo Fraietta
* This project has been assisted by the Commonwealth Government
* through the Australia Council, its arts funding and advisory body.
*
* Port performed by Chris Johns, Cybertec Pty Ltd, Jan 2004.
* Based on the Cybertec CS8900 driver setup for the SFP-101.
*
*/
#if !defined (__BSP_CS8900_H__)
#define __BSP_CS8900_H__
/**
* BSP CS8900 Device initialisation and interface attach.
*
* @param io_base The I/O base address of the device.
*
* @param mem_base The memory base address. Currently not used.
*
* @param intrp The ISA bus IRQ. These are currently limited to
* 5, 10, 11, and 12 as documented in the CS8900
* manual.
*
* @param ip IP address in ASCII. For example 10.10.10.10. If the
* pointer is a NULL (0) the interface will BOOTP.
*
* @param nm Network Mask in ASCII. For example 10.10.10.255.
*
* @param gw Address of the gateway machine. For example
* 10.10.10.1.
*/
void BSP_cs8900_attach (unsigned long io_base, unsigned long mem_base, int intrp,
const char* ip, const char* nm, const char* gw);
#endif
/*
* $Id$
*
* RTEMS CS8900 Driver Setup for the DIMM-PC/i386 made by Kontron.
*
* Port to the DIMM PC copyright (c) 2004 Angelo Fraietta
* This project has been assisted by the Commonwealth Government
* through the Australia Council, its arts funding and advisory body.
*
* Port performed by Chris Johns, Cybertec Pty Ltd, Jan 2004.
* Based on the Cybertec CS8900 driver setup for the SFP-101.
*
*/
#if !defined (__BSP_CS8900_H__)
#define __BSP_CS8900_H__
/**
* BSP CS8900 Device initialisation and interface attach.
*
* @param io_base The I/O base address of the device.
*
* @param mem_base The memory base address. Currently not used.
*
* @param intrp The ISA bus IRQ. These are currently limited to
* 5, 10, 11, and 12 as documented in the CS8900
* manual.
*
* @param ip IP address in ASCII. For example 10.10.10.10. If the
* pointer is a NULL (0) the interface will BOOTP.
*
* @param nm Network Mask in ASCII. For example 10.10.10.255.
*
* @param gw Address of the gateway machine. For example
* 10.10.10.1.
*/
void BSP_cs8900_attach (unsigned long io_base, unsigned long mem_base, int intrp,
const char* ip, const char* nm, const char* gw);
#endif