Commit bfda62a8 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

More adaptations to make POHIC work with the latest RTEMS.

parent 2f6ef936
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
// #include <amba.h> // #include <amba.h>
// #include <bsp/grspw.h> // #include <bsp/grspw.h>
// Things are always moving around in RTEMS. // Things are always moving around in RTEMS - adapt.
// Adapt... the latest RTEMS (2019/07) has restructured Leon/AMBA // The latest RTEMS (2019/07) has restructured Leon/AMBA
// headers under grlib. Detect this by a combination of checks, // headers under grlib. Detect this by a combination of checks,
// that depends on the fact that our custom cross build in TASTE // that depends on the fact that our custom cross build in TASTE
// enabled Ada (which Gaisler's RCC doesn't). // enabled Ada (which Gaisler's RCC doesn't).
......
...@@ -20,7 +20,18 @@ ...@@ -20,7 +20,18 @@
/*#define LEON2_GRLIB*/ /*#define LEON2_GRLIB*/
/* Configure Network if enabled */ /* Configure Network if enabled */
#ifdef ENABLE_NETWORK #ifdef ENABLE_NETWORK
// Things are always moving around in RTEMS - adapt.
// The latest RTEMS (2019/07) has restructured Leon/AMBA
// headers under grlib. Detect this by a combination of checks,
// that depends on the fact that our custom cross build in TASTE
// enabled Ada (which Gaisler's RCC doesn't).
#if ((__RTEMS_ADA__ != 0) && (((__RTEMS_MAJOR__ << 8) | (__RTEMS_MINOR__ << 0)) >= 0x0500))
#include <grlib/network_interface_add.h>
#else
#include <bsp/network_interface_add.h> #include <bsp/network_interface_add.h>
#endif
//#include "networkconfig.h" //#include "networkconfig.h"
// Gaisler uses this file, user provided. for the moment, config done // Gaisler uses this file, user provided. for the moment, config done
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Any modification there should be carefully weighted. * Any modification there should be carefully weighted.
*/ */
// Things are always moving around in RTEMS. // Things are always moving around in RTEMS - adapt.
// Adapt... the latest RTEMS (2019/07) has restructured Leon/AMBA // The latest RTEMS (2019/07) has restructured Leon/AMBA
// headers under grlib. Detect this by a combination of checks, // headers under grlib. Detect this by a combination of checks,
// that depends on the fact that our custom cross build in TASTE // that depends on the fact that our custom cross build in TASTE
// enabled Ada (which Gaisler's RCC doesn't). // enabled Ada (which Gaisler's RCC doesn't).
......
#include <bsp/gr_leon4_n2x.h> #include <bsp/gr_leon4_n2x.h>
#include <drvmgr/ambapp_bus.h>
// Things are always moving around in RTEMS - adapt.
// The latest RTEMS (2019/07) has restructured Leon/AMBA
// headers under grlib. Detect this by a combination of checks,
// that depends on the fact that our custom cross build in TASTE
// enabled Ada (which Gaisler's RCC doesn't).
#if ((__RTEMS_ADA__ != 0) && (((__RTEMS_MAJOR__ << 8) | (__RTEMS_MINOR__ << 0)) >= 0x0500))
#include <grlib/ambapp_bus.h>
#else
#include <drvmgr/ambapp_bus.h>
#endif
/* GR-CPCI-LEON4-N2X boards configuration example. Note that this is /* GR-CPCI-LEON4-N2X boards configuration example. Note that this is
* optional, we only override defaults. If default are ok, nothing * optional, we only override defaults. If default are ok, nothing
......
...@@ -124,7 +124,17 @@ static struct rtems_bsdnet_ifconfig netdriver_config = { ...@@ -124,7 +124,17 @@ static struct rtems_bsdnet_ifconfig netdriver_config = {
0 /* Use default driver parameters */ 0 /* Use default driver parameters */
}; };
#elif defined RTEMS412 #elif defined RTEMS412
// Things are always moving around in RTEMS - adapt.
// The latest RTEMS (2019/07) has restructured Leon/AMBA
// headers under grlib. Detect this by a combination of checks,
// that depends on the fact that our custom cross build in TASTE
// enabled Ada (which Gaisler's RCC doesn't).
#if ((__RTEMS_ADA__ != 0) && (((__RTEMS_MAJOR__ << 8) | (__RTEMS_MINOR__ << 0)) >= 0x0500))
#include <grlib/network_interface_add.h>
#else
#include <bsp/network_interface_add.h> #include <bsp/network_interface_add.h>
#endif
struct ethernet_config interface_configs[]= struct ethernet_config interface_configs[]=
{ {
......
...@@ -35,7 +35,18 @@ ...@@ -35,7 +35,18 @@
#include <ambapp.h> #include <ambapp.h>
#include <drvmgr/drvmgr.h> #include <drvmgr/drvmgr.h>
#include <drvmgr/ambapp_bus_grlib.h> #include <drvmgr/ambapp_bus_grlib.h>
#include <drvmgr/ambapp_bus.h>
// Things are always moving around in RTEMS - adapt.
// The latest RTEMS (2019/07) has restructured Leon/AMBA
// headers under grlib. Detect this by a combination of checks,
// that depends on the fact that our custom cross build in TASTE
// enabled Ada (which Gaisler's RCC doesn't).
#if ((__RTEMS_ADA__ != 0) && (((__RTEMS_MAJOR__ << 8) | (__RTEMS_MINOR__ << 0)) >= 0x0500))
#include <grlib/ambapp_bus.h>
#else
#include <drvmgr/ambapp_bus.h>
#endif
/* GRSPW0 resources */ /* GRSPW0 resources */
struct drvmgr_key grlib_grspw0_res[] = struct drvmgr_key grlib_grspw0_res[] =
......
...@@ -79,7 +79,16 @@ __po_hi_device_id leon_eth_device_id; ...@@ -79,7 +79,16 @@ __po_hi_device_id leon_eth_device_id;
#include <bsp.h> #include <bsp.h>
#include <rtems/rtems_bsdnet.h> #include <rtems/rtems_bsdnet.h>
// Things are always moving around in RTEMS - adapt.
// The latest RTEMS (2019/07) has restructured Leon/AMBA
// headers under grlib. Detect this by a combination of checks,
// that depends on the fact that our custom cross build in TASTE
// enabled Ada (which Gaisler's RCC doesn't).
#if ((__RTEMS_ADA__ != 0) && (((__RTEMS_MAJOR__ << 8) | (__RTEMS_MINOR__ << 0)) >= 0x0500))
#include <grlib/network_interface_add.h>
#else
#include <bsp/network_interface_add.h> #include <bsp/network_interface_add.h>
#endif
#ifdef RTEMS_USE_LOOPBACK #ifdef RTEMS_USE_LOOPBACK
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment