[rtems commit] Remove Edison BSP.

Joel Sherrill joel at rtems.org
Fri Jul 28 19:31:20 UTC 2017


Module:    rtems
Branch:    master
Commit:    dd6992fd7c534bbb05e7cd85274f668632aa2de2
Changeset: http://git.rtems.org/rtems/commit/?id=dd6992fd7c534bbb05e7cd85274f668632aa2de2

Author:    Joel Sherrill <joel at rtems.org>
Date:      Fri Jul 28 14:15:36 2017 -0500

Remove Edison BSP.

Intel has obsoleted this hardware and the BSP was never completed.

closes #3086.

---

 c/src/lib/libbsp/i386/pc386/Makefile.am            |  7 --
 c/src/lib/libbsp/i386/pc386/configure.ac           | 10 ---
 c/src/lib/libbsp/i386/pc386/console/conscfg.c      | 25 ------
 .../lib/libbsp/i386/pc386/console/console_edison.c | 94 ----------------------
 c/src/lib/libbsp/i386/pc386/include/bsp.h          | 27 +------
 c/src/lib/libbsp/i386/pc386/make/custom/edison.cfg |  5 --
 .../lib/libbsp/i386/pc386/startup/bspgetworkarea.c |  5 --
 c/src/lib/libbsp/i386/pc386/startup/bspreset.c     |  6 +-
 c/src/lib/libbsp/i386/pc386/startup/bspstart.c     | 11 ---
 c/src/lib/libbsp/i386/pc386/startup/ldsegs.S       |  2 -
 10 files changed, 3 insertions(+), 189 deletions(-)

diff --git a/c/src/lib/libbsp/i386/pc386/Makefile.am b/c/src/lib/libbsp/i386/pc386/Makefile.am
index 8408db0..cc1a7f6 100644
--- a/c/src/lib/libbsp/i386/pc386/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/Makefile.am
@@ -69,11 +69,7 @@ noinst_LIBRARIES += libbsp.a
 libbsp_a_SOURCES =
 
 # clock
-if RTEMS_EDISON
-libbsp_a_SOURCES += ../../shared/clock_driver_simidle.c
-else
 libbsp_a_SOURCES += clock/ckinit.c
-endif
 libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
 libbsp_a_SOURCES += clock/todcfg.c
 libbsp_a_SOURCES += ../../shared/tod.c
@@ -113,9 +109,6 @@ endif
 endif
 
 # console (non-graphics support)
-if RTEMS_EDISON
-libbsp_a_SOURCES += console/console_edison.c
-endif
 include_HEADERS += ../../i386/shared/comm/i386_io.h
 include_rtems_HEADERS += ../../shared/console_private.h
 libbsp_a_SOURCES += console/serial_mouse_config.c
diff --git a/c/src/lib/libbsp/i386/pc386/configure.ac b/c/src/lib/libbsp/i386/pc386/configure.ac
index d62a9b3..1362115 100644
--- a/c/src/lib/libbsp/i386/pc386/configure.ac
+++ b/c/src/lib/libbsp/i386/pc386/configure.ac
@@ -17,15 +17,6 @@ RTEMS_PROG_CCAS
 RTEMS_CHECK_NETWORKING
 RTEMS_CHECK_SMP
 
-# Is this an Intel Edison?
-# NOTE: As we learn more, this could be trimmed if more issues
-#       turn out fo lack of legacy peripherals
-RTEMS_BSPOPTS_SET([BSP_IS_EDISON],[edison],[1])
-RTEMS_BSPOPTS_SET([BSP_IS_EDISON],[*],[0])
-RTEMS_BSPOPTS_HELP([BSP_IS_EDISON],[Set if the BSP variant is Intel Edison.])
-AM_CONDITIONAL(RTEMS_EDISON,[test "$BSP_IS_EDISON" = "1"])
-
-RTEMS_BSPOPTS_SET([BSP_ENABLE_VGA],[edison],[0])
 RTEMS_BSPOPTS_SET([BSP_ENABLE_VGA],[*],[1])
 RTEMS_BSPOPTS_HELP([BSP_ENABLE_VGA],
 [Set if the VGA and keyboard console support is enabled.])
@@ -35,7 +26,6 @@ RTEMS_BSPOPTS_SET([BSP_ENABLE_COM1_COM4],[*],[1])
 RTEMS_BSPOPTS_HELP([BSP_ENABLE_COM1_COM4],
 [Set if COM1..COM4 support is enabled.])
 
-RTEMS_BSPOPTS_SET([BSP_ENABLE_IDE],[edison],[0])
 RTEMS_BSPOPTS_SET([BSP_ENABLE_IDE],[*],[1])
 RTEMS_BSPOPTS_HELP([BSP_ENABLE_IDE],
 [Set if IDE support is enabled.])
diff --git a/c/src/lib/libbsp/i386/pc386/console/conscfg.c b/c/src/lib/libbsp/i386/pc386/console/conscfg.c
index 82d3cf9..97eb1b8 100644
--- a/c/src/lib/libbsp/i386/pc386/console/conscfg.c
+++ b/c/src/lib/libbsp/i386/pc386/console/conscfg.c
@@ -60,10 +60,6 @@
   }
 #endif
 
-#if (BSP_IS_EDISON == 1 )
-  extern const console_fns edison_fns;
-#endif
-
 /*
  * Default to the PC VGA console if present and configured.
  */
@@ -99,27 +95,6 @@ unsigned long Console_Configuration_Count =
     (sizeof(Console_Configuration_Ports)/sizeof(console_tbl));
 
 static console_tbl Legacy_Ports[] = {
-#if (BSP_IS_EDISON == 1)
-  {
-    "/dev/com1",                           /* sDeviceName */
-    -1,                                    /* deviceType */
-    &edison_fns,                           /* pDeviceFns */
-    NULL,                                  /* deviceProbe */
-    NULL,                                  /* pDeviceFlow */
-    16,                                    /* ulMargin */
-    8,                                     /* ulHysteresis */
-    (void *) NULL,              /* NULL */ /* pDeviceParams */
-    0x00000000,                            /* ulCtrlPort1 */
-    0x00000000,                            /* ulCtrlPort2 */
-    0x00000000,                            /* ulDataPort */
-    NULL,                                  /* getRegister */
-    NULL,                                  /* setRegister */
-    NULL,/* unused */                      /* getData */
-    NULL,/* unused */                      /* setData */
-    0x0,                                   /* ulClock */
-    0x0                                    /* ulIntVector -- base for port */
-  },
-#endif
 #if BSP_ENABLE_COM1_COM4
   {
     "/dev/com1",                           /* sDeviceName */
diff --git a/c/src/lib/libbsp/i386/pc386/console/console_edison.c b/c/src/lib/libbsp/i386/pc386/console/console_edison.c
deleted file mode 100644
index d5e44ae..0000000
--- a/c/src/lib/libbsp/i386/pc386/console/console_edison.c
+++ /dev/null
@@ -1,94 +0,0 @@
-
-#include <bsp.h>
-#include <libchip/serial.h>
-
-/* XXX hack until real support is available, code copied from libchip */
-#define NS16550_RECEIVE_BUFFER   0
-#define NS16550_TRANSMIT_BUFFER  0
-#define NS16550_INTERRUPT_ENABLE 1
-#define NS16550_INTERRUPT_ID     2
-#define NS16550_FIFO_CONTROL     2
-#define NS16550_LINE_CONTROL     3
-#define NS16550_MODEM_CONTROL    4
-#define NS16550_LINE_STATUS      5
-#define NS16550_MODEM_STATUS     6
-#define NS16550_SCRATCH_PAD      7
-#define NS16550_FRACTIONAL_DIVIDER 10
-
-/* status bits we use in line status */
-
-#define SP_LSR_TX     0x40
-#define SP_LSR_THOLD  0x20
-#define SP_LSR_RDY    0x01
-static volatile uint8_t *edison_com = (volatile uint8_t *)0xff010180;
-
-void edison_write_polled(int minor, char cChar);
-int edison_inbyte_nonblocking_polled(int minor);
-
-static int edison_open(int major, int minor, void *arg)
-{
-  return 0;
-}
-
-static int edison_close(int major, int minor, void *arg)
-{
-  return 0;
-}
-
-int edison_inbyte_nonblocking_polled(int minor)
-{
-  if ( edison_com[NS16550_LINE_STATUS] & 0x01 )
-    return (int) edison_com[NS16550_RECEIVE_BUFFER];
-  return -1;
-}
-
-static ssize_t edison_write_support_polled(int minor, const char *buf, size_t len)
-{
-  ssize_t i;
-
-  for ( i=0 ; i<len ; i++ ) {
-#if 0
-    if ( (edison_com[NS16550_LINE_STATUS] & SP_LSR_TX) == 0 )
-      break;
-#else
-    while ( (edison_com[NS16550_LINE_STATUS] & SP_LSR_TX) == 0x00 )
-      /* wait until ready */;
-#endif
-    edison_com[NS16550_TRANSMIT_BUFFER] = (uint8_t) buf[i];
-  }
-  return i;
-}
-
-static void edison_init(int minor)
-{
-}
-
-void edison_write_polled(int minor, char cChar)
-{
-  while ( (edison_com[NS16550_LINE_STATUS] & SP_LSR_TX) == 0x00 )
-    /* wait until ready */;
-  edison_com[NS16550_TRANSMIT_BUFFER] = (uint8_t) cChar;
-}
-
-static bool edison_probe(int minor)
-{
-  return true;
-}
-
-static int edison_set_attributes(int minor, const struct termios *t)
-{
-  return 0;
-}
-
-const console_fns edison_fns =
-{
-  edison_probe,                       /* deviceProbe */
-  edison_open,                        /* deviceFirstOpen */
-  edison_close,                       /* deviceLastClose */
-  edison_inbyte_nonblocking_polled,   /* deviceRead */
-  edison_write_support_polled,        /* deviceWrite */
-  edison_init,                        /* deviceInitialize */
-  edison_write_polled,                /* deviceWritePolled */
-  edison_set_attributes,              /* deviceSetAttributes */
-  FALSE,                              /* deviceOutputUsesInterrupts */
-};
diff --git a/c/src/lib/libbsp/i386/pc386/include/bsp.h b/c/src/lib/libbsp/i386/pc386/include/bsp.h
index 4f42fc4..4ff8952 100644
--- a/c/src/lib/libbsp/i386/pc386/include/bsp.h
+++ b/c/src/lib/libbsp/i386/pc386/include/bsp.h
@@ -189,31 +189,8 @@ void Calibrate_loop_1ms(void);           /* from 'timer.c'  */
 
 void rtems_irq_mngt_init(void);          /* from 'irq_init.c' */
 
-#if (BSP_IS_EDISON == 0)
-  void Clock_driver_install_handler(void);             /* from 'ckinit.c'  */
-  void Clock_driver_support_initialize_hardware(void); /* from 'ckinit.c'  */
-#else
-  /**
-   *  @defgroup edison_bsp Clock Tick Support
-   *
-   *  @ingroup i386_pc386
-   *
-   *  @brief Clock Tick Support Package
-   */
-   void *clock_driver_sim_idle_body(uintptr_t);
-   #define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
-  /*
-   * hack to kill some time. Hopefully hitting a hardware register is slower
-   * than an empty loop.
-   */
-  #define BSP_CLOCK_DRIVER_DELAY() \
-    do { \
-      uint64_t _i = 2500000; \
-      while (_i) { \
-        _i--; \
-      } \
-    } while ( 0 )
-#endif /* edison */
+void Clock_driver_install_handler(void);             /* from 'ckinit.c'  */
+void Clock_driver_support_initialize_hardware(void); /* from 'ckinit.c'  */
 
 void *bsp_idle_thread( uintptr_t ignored );
 #define BSP_IDLE_TASK_BODY bsp_idle_thread
diff --git a/c/src/lib/libbsp/i386/pc386/make/custom/edison.cfg b/c/src/lib/libbsp/i386/pc386/make/custom/edison.cfg
deleted file mode 100644
index 0a4feed..0000000
--- a/c/src/lib/libbsp/i386/pc386/make/custom/edison.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-#  Configuration file for an Intel Edision
-#
-
-include $(RTEMS_ROOT)/make/custom/pc586-sse.cfg
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspgetworkarea.c b/c/src/lib/libbsp/i386/pc386/startup/bspgetworkarea.c
index 5207bac..21cb472 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/bspgetworkarea.c
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspgetworkarea.c
@@ -56,7 +56,6 @@ static void bsp_size_memory(void)
 {
   uintptr_t topAddr;
 
-#if (BSP_IS_EDISON == 0)
   /* Set the value of start of free memory. */
   rtemsWorkAreaStart = (uint32_t)WorkAreaBase + _stack_size;
 
@@ -117,10 +116,6 @@ static void bsp_size_memory(void)
     #endif
   }
 
-#else
-    topAddr = (1 * 1024 * 1024 * 1024);
-#endif
-  
   bsp_mem_size = topAddr;
 }
 
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspreset.c b/c/src/lib/libbsp/i386/pc386/startup/bspreset.c
index b11a123..ebb283b 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/bspreset.c
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspreset.c
@@ -14,9 +14,5 @@
 void bsp_reset(void)
 {
   /* shutdown and reboot */
-  #if (BSP_IS_EDISON == 0)
-    outport_byte(0x64, 0xFE);        /* use keyboard controller */
-  #else
-   *((uint32_t*)0xff009000) = 0xf3;  /* use watchdog */
-  #endif
+  *((uint32_t*)0xff009000) = 0xf3;  /* use watchdog */
 }
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
index 0559fbe..db1ca90 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
@@ -49,7 +49,6 @@ rtems_pci_config_t BSP_pci_configuration = {
  */
 static void bsp_pci_initialize_helper(void)
 {
-#if (BSP_IS_EDISON == 0)
   const pci_config_access_functions *pci_accessors;
 
   pci_accessors = pci_bios_initialize();
@@ -67,7 +66,6 @@ static void bsp_pci_initialize_helper(void)
   }
 
   printk("PCI bus: could not initialize PCI BIOS interface\n");
-#endif
 }
 
 /*-------------------------------------------------------------------------+
@@ -82,17 +80,10 @@ static void bsp_start_default( void )
   /*
    * Turn off watchdog
    */
-#if (BSP_IS_EDISON == 1)
-  volatile uint32_t *edison_wd = (volatile uint32_t *)0xff009000;
-  *edison_wd = 0x11f8;
-#endif
-
   /*
    * Calibrate variable for 1ms-loop (see timer.c)
    */
-#if (BSP_IS_EDISON == 0)
   Calibrate_loop_1ms();
-#endif
 
   /*
    * Init rtems interrupt management
@@ -136,9 +127,7 @@ static void bsp_start_default( void )
    */
   pc386_parse_console_arguments();
 
-#if (BSP_IS_EDISON == 0)
   Clock_driver_install_handler();
-#endif
 
 #if BSP_ENABLE_IDE
   bsp_ide_cmdline_init();
diff --git a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
index 626d5a0..b56bf83 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
+++ b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
@@ -120,7 +120,6 @@ next_step:
 | it isn't fun.
 +---------------------------------------------------------------------*/
 
-#if (BSP_IS_EDISON == 0)
 	movb	$0x11, al		/* initialization sequence          */
 	outb	al, $0x20		/* send it to 8259A-1               */
 	call	SYM(pc386_delay)
@@ -156,7 +155,6 @@ next_step:
 	movb	$0xFB, al		/* mask all irq's but irq2 which    */
 	outb	al, $0x21		/* is cascaded                      */
 	call	SYM(pc386_delay)
-#endif
 	jmp	SYM (_establish_stack)	# return to the bsp entry code
 
 /*-------------------------------------------------------------------------+




More information about the vc mailing list