Changeset c082b575 in rtems


Ignore:
Timestamp:
Feb 5, 2013, 4:23:55 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
dc5cd79
Parents:
39de538
git-author:
Sebastian Huber <sebastian.huber@…> (02/05/13 16:23:55)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/06/13 14:35:55)
Message:

bsp/mpc55xx: Add and use BSP specific fatal codes

Location:
c/src/lib/libbsp/powerpc/mpc55xxevb
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/mpc55xxevb/clock/clock-config.c

    r39de538 rc082b575  
    5252  );
    5353  if (sc != RTEMS_SUCCESSFUL) {
    54     rtems_fatal_error_occurred(0xdeadbeef);
     54    mpc55xx_fatal(MPC55XX_FATAL_CLOCK_EMIOS_IRQ_INSTALL);
    5555  }
    5656}
     
    7272    interval /= (uint64_t) prescaler;
    7373  } else {
    74     rtems_fatal_error_occurred(0xdeadbeef);
     74    mpc55xx_fatal(MPC55XX_FATAL_CLOCK_EMIOS_PRESCALER);
    7575  }
    7676
    7777  /* Check interval */
    7878  if (interval == 0 || interval > MPC55XX_EMIOS_VALUE_MAX) {
    79     rtems_fatal_error_occurred(0xdeadbeef);
     79    mpc55xx_fatal(MPC55XX_FATAL_CLOCK_EMIOS_INTERVAL);
    8080  }
    8181
     
    158158  );
    159159  if (sc != RTEMS_SUCCESSFUL) {
    160     rtems_fatal_error_occurred(0xdeadbeef);
     160    mpc55xx_fatal(MPC55XX_FATAL_CLOCK_PIT_IRQ_INSTALL);
    161161  }
    162162}
  • c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-esci.c

    r39de538 rc082b575  
    269269  rv = rtems_termios_set_initial_baud(tty, BSP_DEFAULT_BAUD_RATE);
    270270  if (rv != 0) {
    271     rtems_fatal_error_occurred(0xdeadbeef);
     271    mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_ESCI_BAUD);
    272272  }
    273273
    274274  rv = mpc55xx_esci_set_attributes(minor, &tty->termios);
    275275  if (rv != 0) {
    276     rtems_fatal_error_occurred(0xdeadbeef);
     276    mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_ESCI_ATTRIBUTES);
    277277  }
    278278
     
    286286  );
    287287  if (sc != RTEMS_SUCCESSFUL) {
    288     rtems_fatal_error_occurred(0xdeadbeef);
     288    mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_ESCI_IRQ_INSTALL);
    289289  }
    290290
  • c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-generic.c

    r39de538 rc082b575  
    8181
    8282  if (count <= 0) {
    83     rtems_fatal_error_occurred(0xdeadbeef);
     83    mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_GENERIC_COUNT);
    8484  }
    8585
     
    9191    sc = rtems_io_register_name(info->device_path, major, minor);
    9292    if (sc != RTEMS_SUCCESSFUL) {
    93       rtems_fatal_error_occurred(0xdeadbeef);
     93      mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER);
    9494    }
    9595  }
     
    9797  sc = rtems_io_register_name(CONSOLE_DEVICE_NAME, major, console);
    9898  if (sc != RTEMS_SUCCESSFUL) {
    99     rtems_fatal_error_occurred(0xdeadbeef);
     99    mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER_CONSOLE);
    100100  }
    101101
  • c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-linflex.c

    r39de538 rc082b575  
    262262  rv = rtems_termios_set_initial_baud(tty, BSP_DEFAULT_BAUD_RATE);
    263263  if (rv != 0) {
    264     rtems_fatal_error_occurred(0xdeadbeef);
     264    mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_BAUD);
    265265  }
    266266
    267267  rv = mpc55xx_linflex_set_attributes(minor, &tty->termios);
    268268  if (rv != 0) {
    269     rtems_fatal_error_occurred(0xdeadbeef);
     269    mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_ATTRIBUTES);
    270270  }
    271271
     
    279279  );
    280280  if (sc != RTEMS_SUCCESSFUL) {
    281     rtems_fatal_error_occurred(0xdeadbeef);
     281    mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_INSTALL);
    282282  }
    283283
     
    291291  );
    292292  if (sc != RTEMS_SUCCESSFUL) {
    293     rtems_fatal_error_occurred(0xdeadbeef);
     293    mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_INSTALL);
    294294  }
    295295
     
    304304  );
    305305  if (sc != RTEMS_SUCCESSFUL) {
    306     rtems_fatal_error_occurred(0xdeadbeef);
     306    mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_INSTALL);
    307307  }
    308308  */
     
    334334  );
    335335  if (sc != RTEMS_SUCCESSFUL) {
    336     rtems_fatal_error_occurred(0xdeadbeef);
     336    mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_REMOVE);
    337337  }
    338338
     
    343343  );
    344344  if (sc != RTEMS_SUCCESSFUL) {
    345     rtems_fatal_error_occurred(0xdeadbeef);
     345    mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_REMOVE);
    346346  }
    347347
     
    353353  );
    354354  if (sc != RTEMS_SUCCESSFUL) {
    355     rtems_fatal_error_occurred(0xdeadbeef);
     355    mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_REMOVE);
    356356  }
    357357  */
  • c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h

    r39de538 rc082b575  
    9797
    9898typedef enum {
    99   MPC55XX_FATAL_FMPLL_LOCK
     99  MPC55XX_FATAL_FMPLL_LOCK,
     100  MPC55XX_FATAL_CLOCK_EMIOS_IRQ_INSTALL,
     101  MPC55XX_FATAL_CLOCK_EMIOS_PRESCALER,
     102  MPC55XX_FATAL_CLOCK_EMIOS_INTERVAL,
     103  MPC55XX_FATAL_CLOCK_PIT_IRQ_INSTALL,
     104  MPC55XX_FATAL_CONSOLE_GENERIC_COUNT,
     105  MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER,
     106  MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER_CONSOLE,
     107  MPC55XX_FATAL_CONSOLE_ESCI_BAUD,
     108  MPC55XX_FATAL_CONSOLE_ESCI_ATTRIBUTES,
     109  MPC55XX_FATAL_CONSOLE_ESCI_IRQ_INSTALL,
     110  MPC55XX_FATAL_CONSOLE_LINFLEX_BAUD,
     111  MPC55XX_FATAL_CONSOLE_LINFLEX_ATTRIBUTES,
     112  MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_INSTALL,
     113  MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_INSTALL,
     114  MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_INSTALL,
     115  MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_REMOVE,
     116  MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_REMOVE,
     117  MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_REMOVE
    100118} mpc55xx_fatal_code;
     119
     120void mpc55xx_fatal(rtems_fatal_code code) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
    101121
    102122#ifdef __cplusplus
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c

    r39de538 rc082b575  
    5858                mpc55xx_wait_for_interrupt();
    5959        }
     60}
     61
     62void mpc55xx_fatal(rtems_fatal_code code)
     63{
     64  rtems_fatal(RTEMS_FATAL_SOURCE_BSP_SPECIFIC, code);
    6065}
    6166
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-clock.c

    r39de538 rc082b575  
    3939
    4040      if (!lock) {
    41         rtems_fatal(RTEMS_FATAL_SOURCE_BSP_SPECIFIC, MPC55XX_FATAL_FMPLL_LOCK);
     41        mpc55xx_fatal(MPC55XX_FATAL_FMPLL_LOCK);
    4242      }
    4343    }
Note: See TracChangeset for help on using the changeset viewer.