Commit Graph

12754 Commits

Author SHA1 Message Date
Joel Sherrill
d52494ec8f arm/lm3s69xx/startup/bspstart.c: Add include of <bsp/bootcard.h> to fix warning 2014-10-09 10:11:55 -05:00
Joel Sherrill
bcc6c700c0 arm/gdbarmsim/irq/irq.c: Fix warnings 2014-10-09 10:11:55 -05:00
Joel Sherrill
1a829d3ac8 arm/gdbarmsim/include/irq.h: Fix spacing 2014-10-09 10:11:55 -05:00
Joel Sherrill
237b34648c arm/gba/irq/irq.c: Fix warnings and clean up 2014-10-09 10:11:55 -05:00
Joel Sherrill
27144f447a arm/gba/clock/clockdrv.c: Fix warnings and clean up 2014-10-09 10:11:55 -05:00
Joel Sherrill
4e8de7e72a libcpu/powerpc/mpc6xx/clock/c_clock.c: Fix warning and clean up 2014-10-09 10:11:54 -05:00
Joel Sherrill
9073f554f8 libbsp/shared/console-polled.c: Fix warning 2014-10-09 10:11:54 -05:00
Joel Sherrill
56c6888bba libbsp/shared/clockdrv_shell.h: Fix warning 2014-10-09 10:11:54 -05:00
Joel Sherrill
0dae39033e libbsp/v850/shared/crt1.c: Remove warnings 2014-10-09 10:11:54 -05:00
Joel Sherrill
780eab400d libcpu/powerpc/mpc8xx/clock: Fix warnings and clean up 2014-10-09 10:11:54 -05:00
Joel Sherrill
46e72c8d5a sparc64/shared/clock/ckinit.c: Clean up formatting 2014-10-09 10:11:54 -05:00
Daniel Hellstrom
44bbee0984 LEON: let termios layer handle \n also in polling 2014-10-09 13:19:41 +02:00
Daniel Hellstrom
b4cebd0560 LEON: console print \r\n instead of \n\r 2014-10-09 13:19:41 +02:00
Daniel Hellstrom
a387e944f8 LEON3: use interrupt layer in clock driver
Manupilating the interrupt control registers directly instead
of going through the interrupt layer can be deceiving.
2014-10-09 13:19:40 +02:00
Daniel Hellstrom
6aacf085b8 SPARC BSPs: irq-shared.c code style clean-up 2014-10-09 13:19:40 +02:00
Daniel Hellstrom
fad33860ae LEON3 SMP: support static interrupt affinity
Changed LEON3_irq-mp to const also.
2014-10-09 13:18:01 +02:00
Daniel Hellstrom
fa40ec5288 SPARC BSPs: added CPU aware interrupt ctrl operations
The LEON2 and ERC32 maps the new macros to CPU0 since they do not
support SMP. With the LEON3 a specific CPU's interrupt controller
registers can be modified using macros.
2014-10-09 09:07:22 +02:00
Sebastian Huber
33ba808288 bsps/mcf5235: Fix warnings 2014-10-09 07:50:37 +02:00
Sebastian Huber
cf7df0e67a bsps/mcf548x: Fix warnings 2014-10-09 07:50:37 +02:00
Sebastian Huber
2734617ab6 bsps/mcf548x: Fix warnings 2014-10-09 07:50:37 +02:00
Sebastian Huber
16ed8f7bdf bsps/mcf548x: Fix warnings 2014-10-09 07:50:36 +02:00
Sebastian Huber
1d3025b5e7 bsp/genmcf548x: Fix warning 2014-10-09 07:50:36 +02:00
Sebastian Huber
8a9bdc565f libchip/serial: Task driven mode for NS16550 2014-10-07 16:35:20 +02:00
Sebastian Huber
2fd3e65fac libchip/serial: Fix NS16550 for pppstart()
Call rtems_termios_dequeue_characters() only in case all characters of
the last write handler invocation have been transmitted.  This avoids
problems with pppstart() since the start line discipline does not know
how many characters have been dequeued and assumes the maximum.
2014-10-07 16:35:20 +02:00
Sebastian Huber
6ec438e8a3 libchip/serial: Add alternative NS16550 driver
Use the Termios device API.
2014-10-07 16:35:20 +02:00
Sebastian Huber
d5cc923fea bsps: Add Termios console driver initialization
Add a simple Termios console driver using a table for statically
registered devices used in console_initialize() and dynamic installation
via console_device_install().
2014-10-07 16:35:20 +02:00
Sebastian Huber
7fd5e89c96 termios: Partially hide rtems_termios_tty
Move interrupt lock to device context and expose only this structure to
the read, write and set attributes device handler.  This makes these
device handler independent of the general Termios infrastructure
suitable for direct use in printk() support.
2014-10-07 16:35:13 +02:00
Sebastian Huber
a830cb864d termios: Separate flow control from normal handler 2014-10-07 16:27:51 +02:00
Daniel Hellstrom
74f5eaffb9 erc32,leon2: replace bsp_reset with SPARC fatal handler
Now that a SPARC fatal handler is defined, we no longer
need the BSP specific reset routine.
2014-10-06 14:52:16 +02:00
Daniel Hellstrom
5e92a40a38 LEON3: use CPU_Fatal_halt for halt
By removing the bsp_reset() mechanism and instead relying on the
CPU_Fatal_halt() routine SMP and single-core can halt by updating
the _Internal_errors_What_happened structure and set the state to
SYSTEM_STATE_TERMINATED (the generic way). This will be better
for test scripts and debugger that can generically look into why
the OS stopped.

For SMP systems, only the fatal-reporting CPU waits until all other
CPUs are powered down (with a time out of one clock tick). The
reason why a fatal stop happend may be because CPU0 was soft-locked
up so we can never trust that CPU0 should do the halt for us.
2014-10-06 14:44:44 +02:00
Daniel Hellstrom
9bd7b3b1a2 SPARC: Fatal_halt use source and exit codes
The Fatal_halt handler now have two options, either halt
as before or enter system error state to return to
debugger or simulator. The exit-code is now also
propagated to the debugger which is very useful for
testing.

The CPU_Fatal_halt handler was split up into two, since
the only the LEON3 support the CPU power down.

The LEON3 halt now uses the power-down instruction to save
CPU power. This doesn't stop a potential watch-dog timer
from expiring.
2014-10-06 13:19:18 +02:00
Daniel Hellstrom
ce4a7ae9da SPARC: add BSP specific error handler
Instead of calling the system call TA instruction directly it
is better paractise to isolate the trap implementation to the
system call functions.

BSP_fatal_exit() is added.
2014-10-06 09:34:24 +02:00
Daniel Hellstrom
dfc2786d4d SPARC BSPs: remove BSP_fatal_return unreached code 2014-10-06 09:34:24 +02:00
Tomasz Gregorek
7db695311b bsp/stm32f4XXXX: System clock configuration
Added simple math to caclulate register values for the PLL
and for the prescalers. It will try to keep 48MHz for the USB OTG FS.
Also it will set latency on the Flash memory for the high speeds.

Limitations:
It is assumed that 1MHz resolution is enough.
Best fits for the clocks are achieved with multiplies of 42MHz.
Even though APB1, APB2 and AHB are calculated user is still required
to provide correct values for the bsp configuration for the:
STM32F4_PCLK1
STM32F4_PCLK2
STM32F4_HCLK (= system clock)
as those are used for the peripheral clocking calculations.
2014-10-02 07:54:52 +02:00
Moroz.Oleg
9a8b29848d Fix assertion "BUF != NULL" for i386
BSP_uart_termios_write_com1 and BSP_uart_termios_write_com2
2014-10-02 07:31:58 +02:00
Daniel Cederman
93b000e645 bsp/leon3: Replace the define LEON3_MP_IRQ with a weakly linked variable
The LEON3_MP_IRQ define is used to pick the IRQ to be used by the
shared memory driver and for inter-processor interrupts. On some LEON3
systems, for example the GR712RC, the default value of 14 is not suitable.
To make this value configurable from the application, it is replaced with
a weakly linked variable that can be overridden from the application.
2014-10-02 07:29:05 +02:00
Hesham ALMatary
fbe59f7c67 or1ksim: Console: implement uart_read_polled
Implement uart_read_polled which is needed for any application that
reads input from users. It works fine with pppd, capture, and all
termios tests.
2014-09-29 14:37:25 -05:00
Sebastian Huber
79bbb1cb67 bsp/genmcf548x: Use inline cache implementation 2014-09-23 10:46:37 +02:00
Sebastian Huber
c3bf343052 bsp/genmcf548x: Delete duplicate network config 2014-09-23 10:46:37 +02:00
Sebastian Huber
bdd6082618 bsps: Fix build error
Fix build error introduced in f535fe5311.
2014-09-18 11:07:41 +02:00
Joel Sherrill
f535fe5311 tod.h -> libcsupport like other driver and helper prototype files
This rippled into the handful of files that should have been using
<rtems/tod.h>.
2014-09-16 16:09:13 -05:00
Joel Sherrill
6cd20744e5 pc386/.../bsp.h: Do not include crt.h
crt.h defines such lovely constants as "RED" and "GREEN" which
have a nasty habit of conflicting with non-BSP code. There is
no reason to include this private .h from bsp.h and pollute the
namespace for applications.
2014-09-16 16:09:12 -05:00
Joel Sherrill
8fbe2e69b5 Use correct prototype of benchmark_timer_read()
This change starts with removing the effectively empty file
timerdrv.h. The prototypes for benchmark_timer_XXX() were in
btimer.h which was not universally used. Thus every use of
timerdrv.h had to be changed to btimer.h. Then the prototypes
for benchmark_timer_read() had to be adjusted to return
benchmark_timer_t rather than int or uint32_t.

I took this opportunity to also correct the file headers to
separate the copyright from the file description comments which
is needed to ensure the copyright isn't propagated into Doxygen
output.
2014-09-16 16:09:12 -05:00
Hesham ALMatary
c080c3434b or1k: New cache manager.
Implement new cache functions for or1k and create new bspstart function
for or1ksim to initialize instruction and data caches. Also, sim.cfg
is modified to enable/confiure cache units.
2014-09-16 12:46:42 -05:00
Hesham ALMatary
bbecf04172 or1ksim: Update README
Modify README to provide instruction on how to run or1ksim BSP on
latest or1ksim emulator built from github repo and add commands
to run or1ksim BSP on QEMU.
2014-09-16 09:53:28 -05:00
Hesham ALMatary
d2c7616057 or1ksim: Implement cpu counter functions. 2014-09-16 09:53:05 -05:00
Hesham ALMatary
5f56d2679a or1ksim: work-around to make or1ksim tick timer accurate.
This patch avoids unexpected behavior when initializing tick timer registers.
Initializing these registers fires unexpected exceptions and interrupts even
though RTEMS has not enabled interrupts yet. So, a little long interval added
to allow RTEMS to finish the remaining initialization work before running the
application. The tick timer interval is adjusted to reflect an accurate
timing for RTEMS applications.
2014-09-16 09:52:58 -05:00
Hesham ALMatary
eb14fc2b2e OpenRISC: Account for red-zone (fixup printf bug).
This patch allocate a space in the stack to account for red-zone
that gcc may utilize for the use of leaf functions. Care must be
taken to handle this red-zone from many places:
1- Upon creation of a new thread stack.
2- Once an interrupt entred.

Also moving the enable-thread-dispach() and increment ISR level before
checking if dispatch needed was required.

The previous modifications solved the printf bug which disabled ticker
to output strings after context switches that arise from Thread_Delay_ended.
2014-09-16 09:52:56 -05:00
Sebastian Huber
74493f053e bsps/arm: Delete obsolete compiler flags
These flags are obsolete with the EABI based ARM tool chain.
2014-09-11 15:05:32 +02:00
Sebastian Huber
c48cf0bd0c score: Rename _BSP_Exception_frame_print()
Rename _BSP_Exception_frame_print() to _CPU_Exception_frame_print() to
be in line with other CPU port functions.
2014-09-11 09:10:16 +02:00