Commit Graph

10724 Commits

Author SHA1 Message Date
Till Strauman
0863e8e390 pc386: scan all functions of multi-function PCI devices
The current algorithm scans all PCI busses (0..ff)
 and all devices (0..31) on each bus for bridges
 and determines the maximum of all subordinate
 busses encountered.

 However, the algorithm does not scan all functions
 present in multi-function devices -- I have a PCI express
 root complex (82801H) where multiple (non-zero index)
 functions are 'PCI bridges' whose subordinate bus number is
 missed by the original algorithm.

 This commit makes sure that the scan
 is extended to all functions of multi-function
 devices.

 See #2067
2014-12-23 22:29:08 -05:00
Pavel Pisa
7d015db0c6 SPI SD-Card: adapt common driver code to block devices core API changes.
close #1558
2014-11-27 11:00:48 +01:00
Aleksandr Platonov
fc48ad84c7 rtems_cache_invalidate_multiple_instruction_lines
According with comment in
rtems_cache_invalidate_multiple_instruction_lines(), final_address
indicates the last address which needs to be invalidated.  But if in
while loop we got final_address == i_addr condition then loop breaks and
final_address will not be invalidated.
2014-01-14 14:46:07 +01:00
Pavel Pisa
df29cfeb0c SPI SD-Card: setup valid CRC-7 for STOP_TRANSMISSION command.
STOP_TRANSMISSION command is used to finish READ_MULTIPLE_BLOCK
command and its format is regular command format.
It requires valid CRC-7 to have effect at least on
same cards types else it is ignored and attempt
to issue next READ or WRITE commands results in
illegal command condition (0x04) preceded by strange
(0x3f) for tested card.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2013-10-08 11:16:15 +02:00
Pavel Pisa
7c709c05e9 Backport of development SPI SD-card patches to RTEMS 4.10.
Arnout Vandecappelle:

        PR 1569/misc
        * libchip/i2c/spi-sd-card.c: Added CRC checks.

        PR 1576/misc
        * libchip/i2c/spi-sd-card.c: Enable CRC checks.

        PR 1567/misc
        * libchip/i2c/spi-sd-card.h, libchip/i2c/spi-sd-card.c: Fixed
        timeouts.

        PR 1579/misc
        * libchip/i2c/spi-sd-card.c: Gradually increasing sleep times when
        waiting for write to finish.

        PR 1580/misc
        * libchip/i2c/spi-sd-card.c: Use bigger chunks and yield processor
        while waiting for read data.

        PR 1586/misc
        * libchip/i2c/spi-sd-card.h, libchip/i2c/spi-sd-card.c: Add retries to
        SD card accesses.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2013-10-08 11:14:42 +02:00
Pavel Pisa
356b8c7baa bsp/csb336: Memory map update to support i.MX1 based PiMX1 as well.
CSB336 i.MX1/i.MXS memory map organization

 - SDRAM starts at address 0x08000000 but 2 MB are reserved
   for boot-block/loader (or other use) before RTEMS image
   origin/load address (that is kept from previous setup)

 - Caching of 30 MB of SDRAM used for RTEMS (start at 0x08200000)
   is changed to writeback mode which provides higher throughput.

 - The first 1 MB of RTEMS dedicated SDRAM is remapped to address 0
   to provide area for ARM CPU exceptions table.

 - Internal registers and rest of the Flash (above 1 MB) are mapped
   one to one. Registers region is extended to 2 MB to cover
   eSRAM found on i.MX1 chip variant.

 - The first two megabytes of SDRAM unused by RTEMS are mapped
   with attributes to allow specific purposes.

   - the first MB (at address 0x08000000) is nocached to allow
     directly set some values read by booot-block after warm reset

   - the second MB (at address 0x08100000) is set for write-through
     caching.  That allows to use memory for LCD frame-buffer without
     need to flush cache after each redraw.

Signed-off-by: Pavel Pisa <pi@baree.pikron.com>
2013-08-19 14:25:22 +02:00
Pavel Pisa
a791d39818 bsp/csb336: implement bsp_interrupt_vector_enable/disable.
Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2013-08-19 14:25:18 +02:00
Pavel Pisa
4eeddefb22 bsp/csb336: mc9328mxl correct AITC access in bsp_interrupt_dispatch.
The original version is missing void and result is that (*x >> 16) is
optimized to ldh rX,[rY]. But it is not allowed/supported to access
bus/address range used by AITC by other than 32 bit wide accesses
and 16-bit access results in the data abort exception.
The corrected version works on real hardware and is even
more readable.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2013-08-19 10:54:02 +02:00
Daron Chabot
833eeae358 Add c++ guard to header. 2013-05-16 11:47:09 +02:00
Ralf Corsépius
c160bc2e97 Remove stray '/'. 2012-10-10 14:49:19 +02:00
Gedare Bloom
d692342a01 Delete lingering bspopts.h.in file 2012-08-09 10:26:07 -04:00
Ralf Corsépius
67aeb83f27 Use http://www.rtems.org/bugzilla as bug-URL. 2012-08-09 09:49:13 -04:00
Sebastian Huber
57d29cd5a9 bsp/genmcf548x: Enable FPU in BSP startup code 2012-05-02 10:27:08 +02:00
Sebastian Huber
eeb965b325 bsp/genmcf548x: Fix BSP options 2012-05-02 10:26:45 +02:00
Joel Sherrill
3f85deb858 PR 2015 - LEON3: make SHM driver configurable using weak symbols
PR 2015/bsps

Since the configuration struct is always present one can let
DATA initialize it to reduce footprint, at the same time it
is made weak to let the user able to configure the SHM driver
without editing the driver code.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-02-17 14:25:13 -06:00
Joel Sherrill
43a26e8a02 PR 1962/bsps - MVME162 Console Corrections and Improvements
* console/console.c: char_ready() was never returning true so console
	never processed input data
	* console/console.c: added printk() support to default device
	* include/bsp.h: Added #define for MOT_162BUG_VEC_ADDRESS
	* startup/bspclean.c: Modified to use MOT_162BUG_VEC_ADDRESS
	* startup/bspstart.c: Modified to use MOT_162BUG_VEC_ADDRESS
	* make/custom/mvme162.cfg: Modified to use "RTEMS_CPU_MODEL=68lc040"
	and "CPU_CFLAGS = -mcpu=68040 -msoft-float" so BSP will always
	work with all board variations.
	* README: Added notes on user required configuration changes and
	information about board models and variants
	* README.models: New file that contains a detailed list of MVME162
	models and variants.

Signed-off-by: Vic Hoover <victor.hoover.ctr@navy.mil>
2012-02-02 14:08:36 -06:00
Joel Sherrill
b5902b8ff7 PR 2011/networking - GRETH: performance improvements and one bugfix
GRETH driver updated, 10-15% performance improvements for GBIT MAC,
unnecessary RX interrupts not taken which under heavy load saves approx.
1500 interrupts/s, one task removed saving about 5kb memory and 1 bug
solved.

BUG: RX interrupt was enabled before the RX-daemon was created which could
result in a faulty call to rtems_event_send.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-02-02 13:06:51 -06:00
Joel Sherrill
1fe02576f0 PR 2011/networking GRETH: Moved print to remove potential deadlock
Deadlock may arise when the EDCL bug link is used to tunnel
console output over Ethernet, when Ethernet is down one should
avoid using console (only during debugging of LEON targets)

Author: Marko Isomaki <marko@gaisler.com>
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-02-02 13:04:49 -06:00
Daniel Hellstrom
9591970856 LEON3: change d-cache snoop detect implementation
PR 2010/bsps

The previous code only checked if d-cache snooping was implemented,
however snooping may be available but not enabled which may lead
to driver bugs.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-02-02 12:08:01 -06:00
Joel Sherrill
45eaf8ccb4 LEON3: CPU index intialization moved to bspstart.c
2009/bsps

All LEON3/4 systems have a CPU-id, if on a single-CPU system the
ID is always zero. On a multicore system it ranges from 0 to 15.

The CPU index should always by updated even in a non-MP RTEMS OS
since the CPU running RTEMS may not always be CPU0. For example
when RTEMS runs on CPU1 and Linux on CPU0 in a mixed ASMP system.

The old code executed within the IRQ controller initialization code
makes no sense since the ASR register is a CPU register, it has
nothing to do with AMBA initialization either.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-02-02 11:22:19 -06:00
Daniel Hellstrom
954099e462 LEON3: fix compiler warning in SHM driver
PR 2008/bsps

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-02-02 10:33:23 -06:00
Joel Sherrill
6698f2714f Add .git ignore. Remove .cvsignore 2012-02-02 10:17:12 -06:00
Joel Sherrill
3c5c7dd963 Add .git ignore. Remove .cvsignore 2012-02-02 10:16:26 -06:00
Daniel Hellstrom
9530716cd4 LEON3BSP MP: may wake one more CPU than expected
The SHM code always wakes one CPU more that configured, however
this has never been a problem since RTEMS will be running on all CPUs
or only two cores were available.

PR 2006/bsps

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-02-02 10:09:46 -06:00
Joel Sherrill
0ae9ee1da4 Upgrade to 4.10.2 2011-12-13 14:34:19 +00:00
Joel Sherrill
5b6f5447c5 2011-11-09 Jennifer Averett <jennifer.averett@oarcorp.com>
PR 1934/bsps
	* libchip/serial/ns16550.c: Change to unsigned variable.
2011-11-09 20:51:08 +00:00
Sebastian Huber
391f35c8ff 2011-08-15 Julien Delange <julien.delange@gmail.com>
* irq/irq.c: Removed printk() before the interrupt initialization
	because it somehow destroys the interrupt context.
	* make/custom/nds.cfg: Enable Thumb interwork.
	* startup/bspstart.c: Set default exception handler.
2011-08-15 08:14:31 +00:00
Joel Sherrill
ca356b5d3a 2011-07-22 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1845/bsps
	* make/custom/rtl22xx_t.cfg: Remove unused line with what is now
	invalid syntax.
2011-07-22 13:12:26 +00:00
Joel Sherrill
395fd11d2e 2011-07-21 Jorge Lopez <jorge.lopez.trescastro@esa.int>
PR 1766/bsps
	* clock/ckinit.c: Add missing read of Timer_Counter_1.
2011-07-21 20:52:27 +00:00
Joel Sherrill
5c2346afa8 Upgrade to 4.10.1 2011-07-21 17:48:36 +00:00
Joel Sherrill
3d2f5a0e79 2011-07-20 Till Straumann <strauman@slac.stanford.edu>
PR 1837/bsps
	* shared/motorola/motorola.c, shared/motorola/motorola.h: Add MVME2400
	board with 750 CPU to list of supported Motorola boards.
2011-07-20 16:39:45 +00:00
Joel Sherrill
3460d8b5a8 formatting. 2011-07-20 13:22:30 +00:00
Joel Sherrill
7805594ba8 2011-07-14 Joel Sherrill <joel.sherrilL@OARcorp.com>
* .cvsignore, include/.cvsignore: New files.
2011-07-14 19:25:38 +00:00
Joel Sherrill
3b06edafb8 2011-07-14 Till Straumann <strauman@slac.stanford.edu>
PR 1833/bsps
	* ne2000/ne2000.c: Addition of multicast support disabled broadcast
	reception. Patch also includes support to work on big endian CPUs.
2011-07-14 14:45:05 +00:00
Joel Sherrill
3960158406 2011-07-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1832/libcpu
	* at91rm9200/irq/irq.c: he bsp_interrupt_dispatch routine does not
	determine the correct interrupt source number. According to the
	datasheet, the reading of the interrupt vector register (AIC_IVR)
	notifies the hardware that the OS is taken care of the interrupt.
	Only after AIC_IVR have been read can the correct source number be
	read from the interrupt status register (AIC_ISR).
2011-07-13 20:24:19 +00:00
Joel Sherrill
fca42af6aa 2011-04-10 Kate Feng <feng@bnl.gov>
PR 1786/bsps
	* Makefile.am: Add support for Altivec.
	* startup/bspstart.c, Makefile.am: Use shared/startup/zerobss.c instead.
	* make/custom/mvme5500.cfg: Change CPU_CFLAGS to
	"-mcpu=7450 -mtune=7450 -Dmpc7455"
	* irq/BSP_irq.c, pci/detect_host_bridge.c, pci.c, pcifinddevice.c:
	Remove warnings.
	* vme/VMEConfig.h, include/bsp.h: use VME shared IRQ handlers.
	* network/if_100MHz/GT64260eth.c: Recycle the Rx mbuf if there
	is any Rx error.
2011-06-17 13:22:25 +00:00
Joel Sherrill
fcd8a63b84 Fix formatting. 2011-06-17 13:22:14 +00:00
Ralf Corsepius
4667b4d130 Merge with CVS-HEAD. 2011-05-25 11:23:30 +00:00
Till Straumann
d1e85c41ea 2011-05-18 Till Straumann <strauman@slac.stanford.edu>
PR1797/bsps
	* shared/bootcard.c: Fixed a typo (in code, not comment) which
	I introduced with the last change.
2011-05-18 16:08:56 +00:00
Till Straumann
37834667fd 2011-05-18 Till Straumann <strauman@slac.stanford.edu>
PR1797/bsps: Applied cleaned-up version of Kate's patch.
	CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK is now a 'bspopts.h'
	setting and as such configurable.
2011-05-18 05:08:36 +00:00
Till Straumann
64a3101718 2011-05-16 Till Straumann <strauman@slac.stanford.edu>
* include/bsp.h: define CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
2011-05-16 15:12:31 +00:00
Sebastian Huber
c7ba440e55 2011-05-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
* include/bsp.h: Moved NEED_LOW_LEVEL_INIT define because it has to be
	visible for the assembler.
	* startup/linkcmds.brs5l: Fixed RAM size.
2011-05-06 06:28:04 +00:00
Joel Sherrill
e115f4b81d 2011-04-25 Jennifer Averett <jennifer.averett@OARcorp.com>
PR 1783/bsps
	* include/bsp.h: Remove dead prototypes of Clock_delay() and delay().
	Neither had bodies.
2011-04-25 19:39:42 +00:00
Joel Sherrill
9effafc88b 2011-04-22 Joel Sherrill <joel.sherrilL@OARcorp.com>
* console/console.c: Now compiles.
2011-04-22 17:07:59 +00:00
Joel Sherrill
b980892c2a 2011-04-20 Joel Sherrill <joel.sherrilL@OARcorp.com>
* acinclude.m4: Regenerated for TLL6527M.
2011-04-20 20:28:33 +00:00
Joel Sherrill
f7761ea064 Fix formatting. 2011-04-20 20:28:07 +00:00
Joel Sherrill
e08510ae01 2011-04-20 Rohan Kangralkar <rkangral@ece.neu.edu>
PR 1781/bsps
	* console/console-io.c: The UART RX and TX are different ISR
	now. So the array containing the registeration changes. The
	change is due to change in the libcup uart function.
2011-04-20 20:25:05 +00:00
Joel Sherrill
dcdfec1451 2011-04-20 Rohan Kangralkar <rkangral@ece.neu.edu>
PR 1781/bsps
        * ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
        preinstall.am, times, console/console.c, include/bsp.h,
        include/cplb.h, include/tm27.h, make/custom/TLL6527M.cfg,
        startup/bspstart.c, startup/linkcmds: New files.
        Initial port for the TLL6527Mboard that contains blackfin 52X
        range of processors. Used eZKit533 as a reference for building
        the port.
2011-04-20 20:23:55 +00:00
Joel Sherrill
0c5ea9bb34 2011-04-20 Rohan Kangralkar <rkangral@ece.neu.edu>
PR 1781/bsps
	* bf52x/include: Added additional MMR.
	* bf52x/interrupt: The BF52X processors have a different
	System interrupt controller than present in the 53X range of
	processors. The 52X have 8 interrupt assignment registers. The
	implementation uses tables to increase predictability.
	* serial/uart.?: Added DMA based and interrupt based transfer
	support. The uart code used a single ISR for TX and RX and tried
	to identify and multiplex inside the ISR. In the new code the
	type of interrupt is identified by the central ISR dispatcher
	bf52x/interrupt or interrupt/.	This simplifies the UART ISR.
2011-04-20 20:19:52 +00:00
Joel Sherrill
17cc97db97 2011-04-11 Keith Robertson <kjrobert at alumni dot uwaterloo dot ca>
* ne2000/ne2000.c: Add multicast support. Patch submitted to mailing
	list 2005-12-21.
2011-04-11 17:27:57 +00:00