Commit Graph
607 Commits
Author SHA1 Message Date
Sebastian Huber 6a9282d9bb Rename is_internal to always_set_to_false
Update #2825.
2016-12-12 08:03:14 +01:00
Pavel Pisa dfcec5595f libchip/network/if_fxp.c: do not use rtems_interrupt_disable.
The single write to memory or ioport output are mostly
atomic operations already. The proper memory synchronization barrier
should be used around them to guarantee ordering (sync or eieio
on PowerPC for example) but because I have not found settable
portable primitive only compiler barrier is used.
It should be enough on x86 because the externally visible order
should be/is guaranteed to be preserved on x86 architecture.
2016-10-17 09:41:58 +02:00
Pavel Pisa 4d3c866aec classic networking: adapt FXP driver to work with actual PCI and IRQ code.
Tested to work with QEMU provided Intel i82557b network controller emulation.

qemu-system-x86_64 -enable-kvm -kernel $APP_BINARY \
      -vga cirrus \
      -append "--console=/dev/com1" \
      -serial stdio \
      -net nic,vlan=1,macaddr=be:be:be:10:00:01,model=i82557b \
      -net tap,ifname=tap1,vlan=1,script=no,downscript=no
2016-09-21 10:24:59 +02:00
Pavel Pisa 8c83cbcc96 classic networking: do not reference BSP_irq_enabled_at_i8259s which is no more available on i386.
This change is required to build RTEMS with classic "--enable-networking"
and link applications/tests which reference RTEMS_BSP_NETWORK_DRIVER_ATTACH.
2016-09-20 22:45:16 +02:00
Sebastian Huber ede1a4182d Make rtems/print.h independent of rtems/bspIo.h 2016-06-22 07:29:26 +02:00
Sebastian Huber 16706b723f bsps: Fix printk() format warning 2016-06-17 08:07:14 +02:00
Sebastian Huber 305231bd3c bsps: Fix MPCI_Fatal() prototype
Close #2742.
2016-06-17 08:04:25 +02:00
Joel Sherrill 381b120acc libchip/shmdr/send.c: Fix warning and clean up 2016-06-16 09:03:22 -05:00
Joel Sherrill 82cb100aba libchip/shmdr/poll.c: Fix warning and clean up 2016-06-16 09:03:22 -05:00
Sebastian Huber dd2c57d40b libchip: Remove dwmac network interface driver
The network interface driver for this module is located in the new
network stack (libbsd), see file "if_dwc.c".
2016-05-31 10:25:25 +02:00
Sebastian Huber 2471316321 score: Rename _ISR_Disable() and _ISR_Enable()
Rename _ISR_Disable() into _ISR_Local_disable().  Rename _ISR_Enable()
into _ISR_Local_enable().  Remove _Debug_Is_owner_of_giant().

This is a preparation to remove the Giant lock.

Update #2555.
2016-05-20 07:50:37 +02:00
Chris Johns 8ce75671eb ibchip/ns16550: Minor optimisation. 2016-05-11 11:45:01 +10:00
Martin Galvan b4d7d5d52e sonic.c: Fix warning on gcc 6
GCC 6.0 previews give the following warning on sonic.c:

../../../../../rtems/c/src/libchip/network/sonic.c:837:11: warning:
statement is indented as if it were guarded by... [-Wmisleading-indentation]

This was discussed here:

https://lists.rtems.org/pipermail/devel/2016-March/014004.html

and we concluded it would be better to rewrite the entire snippet.
2016-05-06 17:08:47 -03:00
Joel Sherrill 12c9dc8ff5 pc386: Eliminate pcibios.h and begin removal obsolete PCI BIOS API uses
This first step eliminates the following as public APIs for the pc386
BSP:

  + pcib_conf_read8
  + pcib_conf_read16
  + pcib_conf_read32
  + pcib_conf_write8
  + pcib_conf_write16
  + pcib_conf_write32

The if_fxp.c driver uses these enough where I provided local macros
to allow the code to be mostly unmodified. On other architectures
these names have been used privately. It will take multiple patches
to completely eliminate these symbols from the RTEMS source tree.

The focus of the first effort is just to eliminate these as a public
pc386 API so support can be added for systems without legacy PCI BIOS.
2016-03-10 10:26:48 -06:00
Joel Sherrill be277dd8e0 libchip/network/if_fxp.c: Do not use rtems_clock_get() 2015-03-17 10:05:06 -05:00
Joel Sherrill 296b024778 libchip/i2c/spi-memdrv.c: Do not use rtems_clock_get() 2015-03-17 10:05:06 -05:00
Sebastian Huber 5155069b23 libchip/serial: Fix warning 2015-03-05 11:23:09 +01:00
Sebastian Huber 2f16001d98 libchip: Fix high capacity detection for MMC
Close #2239.
2015-01-23 11:24:01 +01:00
Josh Oguin aed6e1de21 libchip/serial/z85c30.c: Remove redundant assignment
This was flagged by CodeSonar.
2014-11-26 07:51:57 -06:00
Josh Oguin 02958c5e53 libchip/serial/ns16550* and z8530*: Assert on baud number to avoid divide by 0
This was flagged by CodeSonar. It should be impossible to get an
incorrect baud number back but ensure this in debug mode. The _Assert()
keeps their scanner from evaluating for divide by 0 past this point.
2014-11-26 07:51:57 -06:00
Josh Oguin 0ad1e8001f libchip/display/disp_hcms29xx.c: Remove useless variable and check
This was flagged by CodeSonar.
2014-11-26 07:51:57 -06:00
Sebastian Huber 11925eef78 Delete or rename MIN/MAX macros and defines
Include <sys/param.h> if necessary to get the MIN()/MAX() macros.
2014-11-21 08:52:29 +01:00
Joel Sherrill ef4c4612e2 arm/nds: Warning clean up
This patch eliminates most of the warnings in this BSP but attempts
very little clean up. This BSP includes copies of a lot of code
from free NDS libraries and modifications should be kept to a minimum.
2014-10-10 10:17:33 -05:00
Joel Sherrill 6adacd8971 libchip/rtc/mc146818a.c: Compiles again and clean up 2014-10-10 10:17:17 -05:00
Joel Sherrill 79f093bdd1 libchip/rtc/mc146818a*: Fix prototypes to use uintptr_t and fix set but unused warning 2014-10-09 10:11:58 -05: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 ddf8d1297f libchip/dwmac: Use RTEMS_DEVOLATILE() 2014-09-08 07:53:02 +02:00
Chris Johns 59990cc975 Regenerate all preinstall.am files.
With this patch the preinstall.am files are in a set order and not
dependent on now perl implements a hash.
2014-08-29 12:48:01 +10:00
Christian Mauderer d5f5432967 libchip/dwmac: Make PHY address user configurable
This patch allows the user to configure the PHY address for the DWMAC
driver by giving a pointer to a dwmac_user_cfg structure to network
stack via rtems_bsdnet_ifconfig::drv_ctrl.
2014-08-22 11:48:27 +02:00
Daniel Hellstrom a20c114f4a GRETH: remove TCP/UDP HW checksum generation
The GRETH doesn't support IP fragments.
2014-06-05 09:34:51 +02:00
Ralf Kirchner b0e83e1207 libchip: Add asserts to dwmac driver 2014-04-30 14:53:17 +02:00
Ralf Kirchner 64bc102fbf libchip: Correct netstats message for dwmac driver 2014-04-30 14:53:17 +02:00
Ralf Kirchner a38d4a37bc libchip: Correct error handling in dwmac driver
By fault an rtems_status_code has been expected instead of an errno error number.
2014-04-17 13:24:08 +02:00
Ralf Kirchner 1613a01bb0 libchip: Reduce tx interrupts
Reduce number of packet transmitted interrupts by using the interrupt mechanism only
if we run out of DMA descriptors.
Under normal conditions regaining DMA descriptors, mbufs and clusters is handled
via a counter.
2014-04-17 13:24:07 +02:00
Ralf Kirchner f28b8d4595 libchip: Cleanup 2014-04-17 13:24:07 +02:00
Ralf Kirchner 18fe64a2ca libchip: Improve handling of DMA suspends
Reset the corresponding DMA status bit
2014-04-17 13:24:07 +02:00
Sebastian Huber 598f39cd87 libchip: SMP support for NS16550 2014-04-16 09:07:33 +02:00
Sebastian Huber 8118b67065 libchip: Avoid __DEVOLATILE() 2014-03-31 18:31:52 +02:00
Pavel Pisa 3c21ad7db0 SPI SD-Card: adapt common driver code to block devices core API changes. 2014-03-31 10:14:43 +02:00
Daniel Cederman e4b5085344 greth: Make local functions static, remove overflow and correct printf call. 2014-03-21 09:57:27 -05:00
Daniel Cederman 5130248e12 smc91111: Move driver attach prototype to header file.
Also signal to compiler that the start variable in lan91cxx_recv is only used when debugging.
2014-03-21 09:57:18 -05:00
Chris Johns c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11:00
Ralf Kirchner 5dc268f96d libchip: Relax buffer counts and add fatal error 2014-03-14 16:01:33 +01:00
Sebastian Huber ebb6a8d059 libchip: Include <bsp.h> BSP options definition 2014-03-14 08:43:47 +01:00
Sebastian Huber 9a8bf95b3b libchip: Check interrupt extension availability 2014-03-13 16:47:38 +01:00
Sebastian Huber 062f95328b libchip: Avoid <bsp/utility.h> 2014-03-13 16:47:38 +01:00
Ralf Kirchner 4953b72490 libchip: Add dwmac 10/100/1000 network driver 2014-03-13 16:21:55 +01:00
Sebastian Huber ae88aa7927 sapi: Use one SMP lock for all chains
This partially reverts commit 1215fd4d94.

In order to support profiling of SMP locks and provide a future
compatible SMP locks API it is necessary to add an SMP lock destroy
function.  Since the commit above adds an SMP lock to each chain control
we would have to add a rtems_chain_destroy() function as well.  This
complicates the chain usage dramatically.  Thus revert the patch above.
A global SMP lock for all chains is used to implement the protected
chain operations.

Advantages:

* The SAPI chain API is now identical on SMP and non-SMP
  configurations.

* The size of the chain control is reduced and is then equal to the
  Score chains.

* The protected chain operations work correctly on SMP.

Disadvantage:

* Applications using many different chains and the protected operations
  may notice lock contention.

The chain control size drop is a huge benefit (SAPI chain controls are
66% larger than the Score chain controls).  The only disadvantage is not
really a problem since these applications can use specific interrupt
locks and unprotected chain operations to avoid this issue.
2014-03-11 10:58:09 +01:00