Commit Graph

14176 Commits

Author SHA1 Message Date
Joel Sherrill
b07eae90b3 libbsp/mips/shared/irq.c: Fix warnings 2017-03-09 16:59:12 -06:00
Sebastian Huber
dc95663e8b bsp/tms570: Fix CPU counter frequency
The CPU counter runs with the processor frequency.  Use
RTEMS_SYSINIT_ITEM() to initialize the CPU counter.
2017-03-09 14:17:52 +01:00
Sebastian Huber
5ca634e9c0 bsp/tms570: Support printk() early
Allow use of printk() early in the initalization and without a console
driver.
2017-03-09 13:23:54 +01:00
Sebastian Huber
ce5bcc87df bsp/beagle: Fix warnings 2017-03-08 15:36:55 +01:00
Sebastian Huber
f25c798f42 bsp/smdk2410: Fix format warning 2017-03-08 15:36:54 +01:00
Sebastian Huber
f82e9af7fa bsp/lpc176x: Fix integer to pointer warnings 2017-03-08 15:36:54 +01:00
Sebastian Huber
504a58228d bsps/umon: Fix format warnings 2017-03-08 15:36:54 +01:00
Sebastian Huber
65b63b2b23 bsp/altera-cyclone-v: Remove debug output 2017-03-08 15:36:54 +01:00
Sebastian Huber
2433a8ab1c arm: Remove legacy execption support 2017-03-08 15:36:54 +01:00
Sebastian Huber
6584eb2830 bsp/qoriq: Fix memory configuration
Take nocache section into account which may reside after the workspace.
2017-03-08 10:35:36 +01:00
Sebastian Huber
9cd20cde4d bsps: Provide <bsp/fdt.h> for every BSP
Add bsp_fdt_map_intr() intended for the libbsd FDT support.
2017-03-08 07:19:00 +01:00
Sebastian Huber
a11e1ff576 powerpc: Optimize AltiVec context switch
Use r8 instead of r5 to slightly optimize _CPU_Context_switch().  It is
not a big deal, however, we already assume r12 is used by
_CPU_Context_switch().  Treat r5 the in same way.
2017-03-07 07:58:11 +01:00
Sebastian Huber
c6f7639250 powerpc: Fix AltiVec context switch
Update #2751.
2017-03-07 07:50:12 +01:00
Sebastian Huber
696b5b1e4e bsp/beatnik: More verbose fatal extension 2017-03-06 14:37:43 +01:00
Sebastian Huber
b925ae70f4 bsp/beatnik: Update due to API changes
The device_t typedef is already provided by <sys/types.h> if _KERNEL is
defined.
2017-03-06 11:14:08 +01:00
Daniel Hellstrom
49caf22226 leon, grspw_pkt: fix overwrite protection when more than 32 devs
This is a fix for a coverity warning
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
cc8a50ab5c leon,grtm: ioctl() shouldn't access pointer before validated
This is a fix for a coverity warning
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
fec8288f51 leon, grspw_pkt: SMP support
The driver already was developed with SMP in mind however SMP was
disabled waiting for final fixups and testing.

The new function to control the affinity of the ISR was added
but does not work for now since the LEON BSP does not reroute
IRQs between CPUs during run-time:
 grspw_isr_affinity()
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
36fc8b1835 leon, grspw_pkt: unregister ISR on close 2017-03-06 07:54:55 +01:00
Daniel Hellstrom
090016a4fb leon, grspw_pkt: ISR activate shutdown work only if errintr enabled
In shared interrupt systems it might be a problem to handle the interrupt
regardless of the interrupt is enabled. Now the same approach to the
DMA RX/TX interrupt in the ISR is taken.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
029ce4d1de leon, grspw_pkt: fix descriptor table mem leak on grspw_close() 2017-03-06 07:54:55 +01:00
Daniel Hellstrom
1b559e3113 leon, grspw_pkt: add missing GRSPW1 IP-core support 2017-03-06 07:54:55 +01:00
Daniel Hellstrom
94fb377bd9 leon, grspw_pkt: ISR RX/TX DMA interrupt source disable configurable
This patch introduces some new options to let the user control when
    the ISR shall disable DMA RX/TX interrupt. The ISR can be set in three
    modes when a RX/TX DMA interrupt is asserted:
     1) ISR will always clear both RX/TX DMA interrupt enable. (DEFAULT).
     2) ISR will never never RX or TX DMA interrupt enable, ISR will
        leave RX/TX DMA interrupt enable untouched.
     3) ISR will clear the interrupt enable(s) causing the interrupt,
        this allows separate RX and TX IRQ handling.

    This patch is backwards compatible since default mode 1) is activated
    when the grspw_dma_config.flags DMAFLAGS2_IRQD field is 0.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
8acfa948d4 leon, grpsw_pkt: set unique work-task name 2017-03-06 07:54:55 +01:00
Daniel Hellstrom
72ec13ef6f leon, grspw_pkt: functions to support custom work-task
Added new function:
     * grspw_dma_ctrlsts()       - Read value of DMA CTRL/STS reg.
     * grspw_dma_enable_int()    - re-enable interrupt, used when
                                   implementing a custom work-task.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
29c23046ba leon, grspw_pkt: fix interrupt code ctrl bit declarations 2017-03-06 07:54:55 +01:00
Daniel Hellstrom
ab9b4478a3 leon, grspw_pkt: added work-task configuration options
Following changes:
     * possible for user to create work-tasks and assign custom  message queues.
     * possible for user to override default ISR message to implement custom
       handling of DMA error, DMA RX/TX and link error from ISR.
     * work-task now checks message to determine which work to perform rather than
       looking at registers only, this makes it possible for user to implement
       custom handling.
     * exported work-queue message definitions and separated them so that a user
       can assign custom DMA RX/TX handling of a specific DMA channel.
     * added a work-task event callback to let user add custom handling or
       monitoring of DMA Stop, DMA error, Link Error or work-task exits etc.
2017-03-06 07:54:55 +01:00
Javier Jalle
f46f5f845d leon, grpci2: latency timer user configurable (default 64) 2017-03-06 07:54:55 +01:00
Javier Jalle
0c23dd5046 leon, gr740: fix device registration for GRPCI2 core 2017-03-06 07:54:55 +01:00
Javier Jalle
73b06e64f7 leon, gr-cpci-leon4-n2x: small comment fix 2017-03-06 07:54:55 +01:00
Javier Jalle
bb8e099c48 leon, grpci2: updated DMA descriptor layout 2017-03-06 07:54:55 +01:00
Javier Jalle
d9d8dbdf09 leon, grpci2: fixed wrong bit layout 2017-03-06 07:54:55 +01:00
Javier Jalle
a545ce26d7 leon, grpci2: added TIMEOUT interrupt 2017-03-06 07:54:55 +01:00
Javier Jalle
89173ee97e bsps/sparc: Updated L2C registers 2017-03-06 07:54:55 +01:00
Daniel Hellstrom
ef94150f41 leon, grspw_pkt: Added checks for special list cases
- Fixed grspw_dma_tx_send() so that it does not fail when an empty user packet
  is provided.
- Added empty checks on some of the list handling inline functions for
  GRSPW_PKT. Their use by the driver may be correct already, but the user might
  not have been aware of the assumptions that certain lists had to be non-empty.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
a7cc0da94f leon, grspw_pkt: fix stscfg cfg TimeCode Int clr
Without this patch time code interrupts was never cleared
in the STATUS register.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
0d31dccdee leon, grspw_pkt: split DMA sem into RX and TX sem
By introducing a spearate RX and TX DMA channel semaphore RX
operations and TX operations does not block each other. Stopping
a DMA channel needs now to take both RX and TX semaphores to
block out both RX and TX tasks.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
7701c37d60 leon, grspw_pkt: coding style fix 2017-03-06 07:54:55 +01:00
Daniel Hellstrom
77856f67aa leon, grspw_pkt: allow user controlled DMA intr
The user has already the power to control which DMA buffer
will generate interrupt, but no clean way to enable RX/TX
interrupts on DMA channel. Without this patch the user had
to init DMA config rx/tx_irq_en_cnt to a very large value.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
1ef9caa26b leon, grspw_pkt: support for reading tx/rx DMA queue
* Add support for reading the GRSPW TX/RX descriptor counters
   directly.
 * Add semaphore lock to counters to avoid couters being out
   of sync
 * This makes it possible for the user in polling mode to check
   the amount of work before entering RX/TX descriptor table
   processing.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
eb5a42f6e0 leon, grspw_pkt: fixed device/dma closing
The user is now responsible to stop and close the DMA channels
before closing the device. To prevent complicated situations and
blocking the caller of grspw_close and grspw_dma_close a return
code was added to indicate to the user that the DMA may not have
been stopped or that blocked tasks are still active within the
driver for the specified device.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
36c3fbbd4a leon, grspw_pkt: coding style fixups 2017-03-06 07:54:55 +01:00
Daniel Hellstrom
9cb7e5d80f leon, grspw_pkt: fixed and improved RX/TX wait 2017-03-06 07:54:55 +01:00
Daniel Hellstrom
57e1f4c30b leon, grspw_pkt: fixed error return path in dma_open 2017-03-06 07:54:55 +01:00
Daniel Hellstrom
ac7da5bcb0 leon, grspw_pkt: Manual handling of link status events
Added functionality for manual handling of link status events,
configurable via grspw_link_ctrl.

Added statistics counter for disconnect error.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
49cf776e7f leon, grspw_pkt: added link_ctrl options
Improved the link error handling options. Its now possible to
disable the link on individual link errors/warnings instead of
always on all or none.

Changed name of LINKOPTS_IRQ to LINKOPTS_EIRQ to match Linux
and VxWorks SpW driver.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom
fad4324d52 leon, grspw_pkt: added grspw_link_status_clr() to API 2017-03-06 07:54:55 +01:00
Daniel Hellstrom
c442647f9d leon, grspw_pkt: code style clean-ups 2017-03-06 07:54:55 +01:00
Daniel Hellstrom
61cc024aca leon, gptimer: start/reset must take RS and IP into account 2017-03-06 07:54:55 +01:00
Daniel Hellstrom
b109add5b2 leon: Fix ambapp_bus OCCAN device registeration order
NOTE that this will change the association of /dev/occanN
with OCCAN[N] device to the same order as in hardware. This means
that if you have been useing /dev/occan0 before you have to use
/dev/occan1 on a dual OCCAN device system (this affects GR712RC).
2017-03-06 07:54:55 +01:00