Commit Graph

13239 Commits

Author SHA1 Message Date
Daniel Hellstrom
ecbd5772bd AMBAPP: update AMBA PnP ID database 2015-04-17 01:10:19 +02:00
Daniel Hellstrom
175b9a6472 GRPCI2: work-around for rev0 bug by limiting prefetching 2015-04-17 01:10:19 +02:00
Daniel Hellstrom
819de55b6f PCI-RASTA: set GRPCI1 target cache-line-size to avoid poor performance 2015-04-17 01:10:19 +02:00
Daniel Hellstrom
37ac3b86ea GRETH: cleaned up parts of PHY init code 2015-04-17 01:10:19 +02:00
Daniel Hellstrom
107c5aea26 GRETH: changed the PHY initialization sequence
1. read_mii() now returns 0xffff on failure. It is more robust when it
   comes to reading the reset bit in the control register, that is the
   first access.

2. write_mii() now has error printout like read_mii().

3. Additional (optional) PHY access debugging is now available by
   enabling GRETH_DEBUG_MII. Even successful accesses are printed.

4. Let PHY do power-down (not only reset) to get in a good state,
   this is just in case the PHY input pin settings are sampled only
   on PHY power-up on some PHYs.

5. PHY GBit advertisement is disabled if Gbit is not supported by MAC.
   Or forced if supported.

6. Auto-nego is started if supported by PHY, before it was started only
   if default set by PHY.

7. Reset Sequence updated:
     * one must wait until reset bit is self-cleared.
     * the DD (Disable Duplex Detection) bit is set, only affects
       EDCL capable devices. This lets RTEMS handle PHY initialization
2015-04-17 01:10:19 +02:00
Daniel Hellstrom
a79c36ad1d GRETH: forcing autonegotiation during PHY initialization
Looking at PHY Ctrl register without reseting it will give back
old register content, that is not stable. Instead the PHY is
reset and the autonogotiation capability is read out and
started if present.
2015-04-17 01:10:18 +02:00
Daniel Hellstrom
bee7c46f85 GRETH: updated worker Deamon thread name
The name was probably copied from the DEC21140 driver
2015-04-17 01:10:18 +02:00
Daniel Hellstrom
552d4a9ce5 GRPCI: initialize cache-line-size and latency timer
In some GRPCI cores not setting the cache line size could result
in long prefetches on the AMBA bus which would lead to bad
performance when doing PCI reads to GRPCI target interface (DMA).
2015-04-17 01:10:18 +02:00
Daniel Hellstrom
5dd83de944 GRSPW: fixed SET_RMAPEN and SET_RMAPBUFDIS
Both ioctl commands destroyed the control register by writing the
content of the status register into it.
2015-04-17 01:10:18 +02:00
Daniel Hellstrom
4d249b9fed GPTIMER: support separate & shared irq by clearing pending bit after ISR 2015-04-17 01:10:18 +02:00
Daniel Hellstrom
7ebc28cd1a GPTIMER: Only probe pending bit on timer0 2015-04-17 01:10:18 +02:00
Daniel Hellstrom
b583cc5f75 leon,gpiolib: add mask/unmask interrupt support 2015-04-17 01:10:18 +02:00
Arvid Bjorkengren
949d0d6206 GRSPW: Make sure buffers are 64-bit aligned
This is to improve odds of getting a fast memcpy-operation.
2015-04-17 01:10:18 +02:00
Daniel Hellstrom
18564f5317 APBUART: fix GRMON -u support for older UARTs 2015-04-17 01:10:18 +02:00
Daniel Hellstrom
0f49c0e2f4 GRSPW: New packet based driver for SPW/SPW2/SPW2_DMA
This patch adds a new driver for the GRSPW SpaceWire AMBA
interface family. The new driver does not implement a standard
RTEMS driver, instead it provides only a library interface to
the GRSPW devices. This driver can be used to implement a
RTEMS I/O driver or used directly.

New features compared with old GRSPW driver:
 * zero-copy packet interface
 * possibility to send/receive mulitple packets per call
 * optional interrupt awaken work-task to process TX/RX queues
 * DMA channels support. Before only first DMA channel supported
 * Separate DMA and link control
 * Packet based error flags
2015-04-17 01:10:18 +02:00
Daniel Hellstrom
16d6e42c43 LEON3: fixed nano seconds support in TLIB
The _Watchdog_Nanoseconds_since_tick_handler() function caller does
not take into account that the timer counter may wrap, underflow or
overflow. Instead, the driver must take that into account. This
GPTIMER DrvMgr driver patch makes use of the IRQ-Pending bit to
determine if a underflow has happened. In that case a greater time
than one tick is returned (even considering the function name..).

The TLIB clock layer must also ACK the interrupt pending bit,
otherwise we couldn't determine whether an IRQ is pending or if
belongs to un old already handled tick IRQ.

Note that this patch only fixes the DrvMgr GPTIMER driver and TLIB,
the standard LEON3 GPTIMER driver still needs a fix.
2015-04-17 01:10:18 +02:00
Daniel Hellstrom
f00fee8eb1 GRTM: fixed bug where transmitter start loop was optimized away 2015-04-17 01:10:17 +02:00
Daniel Hellstrom
e9378fa191 GRPCI: fix target BAR1 initialization 2015-04-17 01:10:17 +02:00
Daniel Hellstrom
3bb41226e0 LEON: added new drivers to the LEON2/LEON3 BSPs
Most drivers use the Driver Manager for device probing, they
work on AMBA-over-PCI systems if PCI is big-endian.

New APIs:
 * GPIO Library, interfaced to GRGPIO
 * GENIRQ, Generic interrupt service implementation helper

New GRLIB Drivers:
 * ACTEL 1553 RT, user interface is similar to 1553 BRM driver
 * GR1553 (1553 BC, RT and BM core)
 * AHBSTAT (AHB error status core)
 * GRADCDAC (Core interfacing to ADC/DAC hardware)
 * GRGPIO (GPIO port accessed from GPIO Library)
 * MCTRL (Memory controller settings configuration)
 * GRETH (10/100/1000 Ethernet driver using Driver manager)
 * GRPWM (Pulse Width Modulation core)
 * SPICTRL (SPI master interface)
 * GRSPW_ROUTER (SpaceWire Router AMBA configuration interface)
 * GRCTM (SpaceCraft on-board Time Management core)
 * SPWCUC (Time distribution over SpaceWire)
 * GRTC (SpaceCraft up-link Tele core)
 * GRTM (SpaceCraft down-link Tele Metry core)

GR712RC ASIC specific interfaces:
 * GRASCS
 * CANMUX (select between OCCAN and SATCAN)
 * SATCAN
 * SLINK
2015-04-17 01:10:17 +02:00
Daniel Hellstrom
fe1aa9c002 LEON: added network device configuration helper function 2015-04-17 01:10:17 +02:00
Daniel Hellstrom
3681925508 LEON: updated shared drivers to Driver Manger framework
Some bugfixes at the same time. After this patch the drivers
may be used on RASTA systems having a big-endian PCI layout.

Removed not up to date changelogs, rely on git log instead.
2015-04-17 01:10:17 +02:00
Daniel Hellstrom
e67b2b8d05 LEON: updated and added PCI peripherals for LEON BSPs
The CCHIP driver is replaced with the GR_701 driver. The
RASTA driver is replaced by the GR-RASTA-IO driver.

All drivers are now compatible with both LEON2 and LEON3,
drivers were initialized directly by the PCI-board drivers
are now initialized by the driver manager and therefore
does not require the double code created by including for
example grcan.c into grcan_rasta.c. The other drivers needs
to be updated to the driver manager framework however.

Added support for:
 * GR-701 (only LEON2 before)
 * GR-RASTA-IO (only LEON2 before)
 * GR-RASTA-ADCDAC
 * GR-RASTA-TMTC
 * GR-RASTA-SPW-ROUTER
 * GR-TMTC-1553
2015-04-17 01:10:17 +02:00
Daniel Hellstrom
3e3fb0d40b LEON2: added support for LEON2-GRLIB systems
In some non-standard designs GRLIB peripherals are used together
LEON2. This patch adds a GRLIB amba Plug&Play driver so that AMBA
devices can be found from Plug&Play the same way as with the LEON3
BSP.

The user is required to add an AMBA-PnP device entry into the LEON2
bus configuration, so that the driver manager unite this driver
with the "fake" device and start scanning after AMBA PnP devices.
2015-04-17 01:10:17 +02:00
Daniel Hellstrom
46e41c98b3 LEON: replaced old BSP PCI layer with new generic libpci PCI layer
The old code used a limited PCI configuration library, which was
duplicated into LEON2 and LEON3 BSP pci.c together with respective
Host controller PCI interface.

The LEON2 BSP had support for AT697 PCI, and LEON3 for GRPCI PCI
Host controller. With this update new PCI Host drivers are added,
and all support the new generic PCI Library:
 * AT697 PCI (LEON2 only)
 * GRPCI (LEON2-GRLIB and LEON3)
 * GRPCI2 (LEON2-GRLIB and LEON3)
 * Actel PCIF GRLIB Wrapper (LEON3 only)

The LEON2 BSP is defined as big-endian PCI in bsp.h, since the
AT697 supports only big-endian PCI.
2015-04-17 01:10:17 +02:00
Daniel Hellstrom
c176410021 LEON3: new Console driver, APBUART driver using Driver Manager
This patch reimplements the console driver of the LEON3 BSP, it
has split up the console driver in two parts: Console driver and
UART driver. Before the only UART supported was APBUART and only
on-chip APBUARTs found during startup. However splitting the
driver in two allows any UART interface to reuse the termios
attach code of the console driver, pratically this has always
been a problem when discovering APBUARTs after startup for
example the PCI board GR-RASTA-IO has APBUARTs and must wait
until after PCI has been setup.

Since the only current driver that supports the new console
driver uses the Driver Manager, the new console driver is
only enabled when Driver Manager is initialized during startup.

The new APBUART driver supports:
 * polling mode
 * interrupt mode
 * task-driven mode
 * set UART attributes
 * read UART attributes (system console inherit settings from
   boot loader)
 * Driver manager for finding/initialization of the hardware
2015-04-17 01:10:16 +02:00
Daniel Hellstrom
045de3556f MERGE: new system clock implementation 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
cd64fbfb68 LEON: GPTIMER driver, Timer Library and System Clock for LEON3
With this patch the LEON family can access the GRLIB GPTIMER using
the Timer library (TLIB).

A System Clock driver instead of BSP/clock/ck_init.c is provided
using the TLIB. The classic clock driver is split in two parts,
clock driver and timer driver. The BSPs need only to fullfill the
timer interface instead of the clock interface. Currently only
LEON3 uses it. The LEON2 Timer is not ported to TLIB.

The GPTIMER driver is implemented using the Driver Manager, so the
System Clock Driver is at this point only suitable for LEON3 when
the driver manager is initialized during BSP startup. When the DrvMgr
is not initialized during startup the standard BSP/clock dirver is
used.

LEON2 sometimes also needs to access GPTIMER when a off-chip GRLIB AMBA
systems is connected, for example AMBA-over-PCI.
2015-04-17 01:10:16 +02:00
Daniel Hellstrom
3db9e5b03d LEON2: implemented AMBA Bus Driver for Driver Manager 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
e05c2659f4 LEON3: implemented AMBA PnP Bus Driver for Driver Manager 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
d11f2286c2 sparc BSPs: implemented libpci IRQ BSP support 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
e428dc4a95 LEON3: implemented BSP DRVMGR startup initialization 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
e7fade3ac4 DRVMGR: added driver manager to cpukit/libdrvmgr 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
e51eb80e88 leon3,ngmp: simplify cpucounter initialization
Remove support for using the second timer for time stamping.
Instead the user can configure the system clock timer to a higher
base clock frequency (lower the prescaler). This change does not
affect the GR712RC or LEON4-N2X. The GR712RC does not have two
GPTIMERs and the N2X uses the Interrupt Controller for time
stamping.

Bow that the AMBA initialization code exports the AMBA device,
the frequency can be obtained without an additional AMBA PnP
scanning.
2015-04-17 01:10:15 +02:00
Daniel Hellstrom
5da315ffdc leon3: make timer initialization configurable
Its now possible to select which timer core will be used for
system clock timer and to control the timer prescaler that
affects all timer instances on that timer core.

The timer and interrupt controller AMBA devices are exported
to make it possible for other code to get detailed information.
For example the frequency of the timer and interrupt controller
is required by the cpucounter support.
2015-04-17 01:10:15 +02:00
Daniel Hellstrom
ead16ae1ba leon3: always clear interrupt controller 2015-04-17 01:10:15 +02:00
Daniel Hellstrom
60b0fd511f leon3: clock driver rely on previous found timer
No point in scanning for the same GPTIMER twice. Rely on
amba.c AMBA PnP scanning.
2015-04-17 01:10:15 +02:00
Daniel Hellstrom
31e4e25dfe LEON3: GPTIMER timer watchdog driver
Last timer instance of GPTIMER is sometimes a watchdog timer that
can reset the system on timer underflow.
2015-04-17 01:10:15 +02:00
Joel Sherrill
cb02e8accc bf537Stamp: Re-enable bsp_reset() 2015-04-15 10:02:58 -05:00
Joel Sherrill
74c4facdce tms570/startup/bspreset.c: Add include <bsp/bootcard.h> to fix warning 2015-04-15 10:02:58 -05:00
Joel Sherrill
1aaf2fb736 lm32/shared/startup/bspreset.c: New file missed in previous commit 2015-04-14 15:01:53 -05:00
Hesham ALMatary
0a73de2fc8 or1ksim: Fix bug at UART driver.
Fix some UART register addresses and implementation bugs that
were causing malfunction of console driver on real hardware.

hello and ticker samples are tested and working fine now on mor1kx
based SoC on Atlys FPGA board.
BSP_OR1K_OR1KSIM_PERIPHCLK has been changed to 50MHz as with mor1kx/atlys
SoC; this change has no effect on the current simulators that RTEMS run
on.
2015-04-14 11:10:14 -05:00
Thomas Volgmann
a1d6f7a405 bsp/altera-cyclone-v: Add RTC driver 2015-04-10 08:23:00 +02:00
Alan Cudmore
044c7d8280 Add hardware FPU flags for Raspberry Pi 2 BSP 2015-04-09 14:35:10 -04:00
Joel Sherrill
45491a8804 lm32 BSPs: Add lm32_evr variant for running on gdb.
Lay groundwork for a simulator configuration configuration
for the Milkymist. This is needed to use the shared code.
2015-04-05 15:49:32 -05:00
Joel Sherrill
d0307c8a06 or1ksim-testsuite.tcfg: new file 2015-04-03 16:18:40 -05:00
Joel Sherrill
475ff0a748 ods68302-testsuite.tcfg: Add fileio 2015-04-03 15:08:01 -05:00
Joel Sherrill
6601619807 rtl22xx-testsuite.tcfg: Add fileio 2015-04-03 15:07:47 -05:00
Sebastian Huber
aae6c21810 bsp/altera-cyclone-v: Fix define usage 2015-04-02 08:31:09 +02:00
Joel Sherrill
c966b4dc35 simsh*: Disable interrupt critical section tests
These do not run reliably on this simulator.
2015-04-01 09:39:42 -05:00
Joel Sherrill
ef3bcef890 jmr3904-testsuite.tcfg: New file 2015-04-01 09:39:42 -05:00