Changeset 8a54204 in rtems


Ignore:
Timestamp:
Nov 12, 2010, 2:16:57 PM (10 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
ddd5640
Parents:
ed2ab95
Message:

2010-11-12 Sebastian Huber <sebastian.huber@…>

  • console/console.h, console/console.c, console/config.c, console/ns16550cfg.c: Removed files.
  • console/console-config.c: New file.
  • Makefile.am: Reflect changes above.
  • configure.ac: New BSP options.
  • include/bsp.h: Use new BSP options.
  • network/network.c: Avoid memory leak.
  • startup/bspstart.c: Initialize console port table.
  • spi/spi_init.c: Update for SD card API changes.
Location:
c/src/lib/libbsp/powerpc/gen83xx
Files:
1 added
4 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/gen83xx/ChangeLog

    red2ab95 r8a54204  
     12010-11-12      Sebastian Huber <sebastian.huber@embedded-brains.de>
     2
     3        * console/console.h, console/console.c, console/config.c,
     4        console/ns16550cfg.c: Removed files.
     5        * console/console-config.c: New file.
     6        * Makefile.am: Reflect changes above.
     7        * configure.ac: New BSP options.
     8        * include/bsp.h: Use new BSP options.
     9        * network/network.c: Avoid memory leak.
     10        * startup/bspstart.c: Initialize console port table.
     11        * spi/spi_init.c: Update for SD card API changes.
     12
    1132010-06-29      Joel Sherrill <joel.sherrill@oarcorp.com>
    214
  • c/src/lib/libbsp/powerpc/gen83xx/Makefile.am

    red2ab95 r8a54204  
    8080
    8181# console
    82 libbsp_a_SOURCES += console/console.c console/ns16550cfg.c
     82libbsp_a_SOURCES += ../../shared/console.c \
     83        console/console-config.c
    8384# bsp_i2c
    8485libbsp_a_SOURCES += i2c/i2c_init.c
  • c/src/lib/libbsp/powerpc/gen83xx/configure.ac

    red2ab95 r8a54204  
    4444[If defined, use custom settings for the MPC8349 libcpu family.])
    4545
     46RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[mpc8313erdb],[115200])
     47RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[*],[9600])
     48RTEMS_BSPOPTS_HELP([BSP_CONSOLE_BAUD],[Default baud for console and other serial devices.])
     49
     50RTEMS_BSPOPTS_SET([BSP_USE_UART_INTERRUPTS],[mpc8313erdb],[1])
     51RTEMS_BSPOPTS_HELP([BSP_USE_UART_INTERRUPTS],[enable usage of interrupts for the UART modules])
     52
     53RTEMS_BSPOPTS_SET([BSP_USE_UART2],[mpc8313erdb],[1])
     54RTEMS_BSPOPTS_SET([BSP_USE_UART2],[mpc8349eamds],[1])
     55RTEMS_BSPOPTS_SET([BSP_USE_UART2],[hsc_cm01],[1])
     56RTEMS_BSPOPTS_HELP([BSP_USE_UART2],[If defined, enables UART2.])
     57
     58RTEMS_BSPOPTS_SET([HAS_UBOOT],[mpc8313erdb],[1])
     59RTEMS_BSPOPTS_HELP([HAS_UBOOT],[If defined, enables U-Boot support.])
     60
     61RTEMS_BSPOPTS_SET([PPC_USE_DATA_CACHE],[*],[1])
     62RTEMS_BSPOPTS_HELP([PPC_USE_DATA_CACHE], [If defined, then the PowerPC specific
     63 code in RTEMS will use data cache instructions to optimize the context switch code.])
    4664
    4765RTEMS_CHECK_NETWORKING
  • c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h

    red2ab95 r8a54204  
    2121#define __GEN83xx_BSP_h
    2222
     23#define BSP_FEATURE_IRQ_EXTENSION
     24
    2325#include <bspopts.h>
    24 
    25 /*
    26  * MPC8313E Reference Design Board
    27  */
    28 
    29 #ifdef MPC8313ERDB
    30 
    31 #define HAS_UBOOT
    32 
    33 /* For U-Boot */
    34 #define CONFIG_MPC83XX
    35 #define CONFIG_HAS_ETH1
    36 
    37 #endif /* MPC8313ERDB */
    3826
    3927#include <libcpu/powerpc-utility.h>
     
    7967#endif
    8068
    81 
    8269#include <rtems.h>
    8370#include <rtems/console.h>
    8471#include <rtems/clockdrv.h>
     72#include <bsp/vectors.h>
    8573#include <bsp/irq.h>
    86 #include <bsp/vectors.h>
    87 #include <bsp/tictac.h>
    8874
    8975#ifdef HAS_UBOOT
     76  #ifdef MPC8313ERDB
     77    #define CONFIG_MPC83XX
     78    #define CONFIG_HAS_ETH1
     79  #endif
    9080
    91 #include <bsp/u-boot.h>
     81  #include <bsp/u-boot.h>
    9282
    93 extern bd_t bsp_uboot_board_info;
    94 extern const size_t bsp_uboot_board_info_size;
    95 
    96 #endif /* HAS_UBOOT */
    97 
    98 #define BSP_UART1_MINOR 0
    99 #define BSP_UART2_MINOR 1
     83  extern bd_t bsp_uboot_board_info;
     84  extern const size_t bsp_uboot_board_info_size;
     85#endif
    10086
    10187/*
     
    11298rtems_status_code bsp_register_spi(void);
    11399
    114 /* console modes (only termios) */
    115 #ifdef  PRINTK_MINOR
    116 #undef  PRINTK_MINOR
    117 #endif
    118 #define PRINTK_MINOR BSP_UART1_MINOR
    119 
    120 #if defined(MPC8249EAMDS) || defined(HSC_CM01)
    121 #define BSP_USE_UART2 TRUE
    122 #else
    123 #define BSP_USE_UART2 FALSE
    124 #endif
    125 
    126 #define SINGLE_CHAR_MODE
    127 #define UARTS_USE_TERMIOS_INT   1
    128 
    129100/*
    130101 * Network driver configuration
     
    135106
    136107#ifdef MPC8313ERDB
    137 
    138 #define RTEMS_BSP_NETWORK_DRIVER_NAME   "tsec2"
    139 #define RTEMS_BSP_NETWORK_DRIVER_NAME2  "tsec1"
    140 
    141 #else /* MPC8313ERDB */
    142 
    143 #define RTEMS_BSP_NETWORK_DRIVER_NAME   "tsec1"
    144 #define RTEMS_BSP_NETWORK_DRIVER_NAME2  "tsec2"
    145 
    146 #endif /* MPC8313ERDB */
     108  #define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec2"
     109  #define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec1"
     110#else
     111  #define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec1"
     112  #define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec2"
     113#endif
    147114
    148115#if defined(MPC8349EAMDS)
  • c/src/lib/libbsp/powerpc/gen83xx/network/network.c

    red2ab95 r8a54204  
    6868{
    6969  int    unitNumber;
    70   char   *unitName;
    7170
    7271  /*
    7372   * Parse driver name
    7473   */
    75   if((unitNumber = rtems_bsdnet_parse_driver_name(config, &unitName)) < 0) {
     74  if((unitNumber = rtems_bsdnet_parse_driver_name(config, NULL)) < 0) {
    7675    return 0;
    7776  }
  • c/src/lib/libbsp/powerpc/gen83xx/spi/spi_init.c

    red2ab95 r8a54204  
    248248#include <libchip/spi-sd-card.h>
    249249
    250 sd_card_driver_entry sd_card_driver_table [1] = { {
    251 #if 0
    252                 .driver = {
    253                         .ops = &sd_card_driver_ops,
    254                         .size = sizeof( sd_card_driver_entry)
    255                 },
    256                 .table_index = 0,
    257                 .minor = 0,
    258 #endif
    259                 .device_name = "sd-card-a",
    260 #if 0
    261                 .disk_device_name = "/dev/sd-card-a",
    262 #endif
    263                 .transfer_mode = SD_CARD_TRANSFER_MODE_DEFAULT,
    264                 .command = SD_CARD_COMMAND_DEFAULT,
    265                 /* .response = whatever, */
    266                 .response_index = SD_CARD_COMMAND_SIZE,
    267                 .n_ac_max = SD_CARD_N_AC_MAX_DEFAULT,
    268                 .block_number = 0,
    269                 .block_size = 0,
    270                 .block_size_shift = 0,
    271                 .busy = 1,
    272                 .verbose = 1,
    273                 .schedule_if_busy = 0
    274         }
     250#define SD_CARD_NUMBER 1
     251
     252size_t sd_card_driver_table_size = SD_CARD_NUMBER;
     253
     254sd_card_driver_entry sd_card_driver_table [SD_CARD_NUMBER] = {
     255  {
     256    .device_name = "/dev/sd-card-a",
     257    .bus = 0,
     258    .transfer_mode = SD_CARD_TRANSFER_MODE_DEFAULT,
     259    .command = SD_CARD_COMMAND_DEFAULT,
     260    /* .response = whatever, */
     261    .response_index = SD_CARD_COMMAND_SIZE,
     262    .n_ac_max = SD_CARD_N_AC_MAX_DEFAULT,
     263    .block_number = 0,
     264    .block_size = 0,
     265    .block_size_shift = 0,
     266    .busy = true,
     267    .verbose = true,
     268    .schedule_if_busy = false
     269  }
    275270};
    276271
     
    300295\*=========================================================================*/
    301296{
     297  rtems_status_code sc = RTEMS_SUCCESSFUL;
    302298  int ret_code;
    303299  unsigned spi_busno;
     
    379375
    380376  /* Register SD Card driver */
    381   ret_code = rtems_libi2c_register_drv(
    382     sd_card_driver_table [0].device_name,
    383     (rtems_libi2c_drv_t *) &sd_card_driver_table [0],
    384     spi_busno,
    385     0
    386   );
     377  sd_card_driver_table [0].bus = spi_busno;
     378  sc = sd_card_register();
     379  if (sc != RTEMS_SUCCESSFUL) {
     380    return sc;
     381  }
    387382
    388383#elif defined( MPC8349EAMDS)
  • c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c

    red2ab95 r8a54204  
    2020 * $Id$
    2121 */
     22
     23#include <libchip/serial.h>
    2224
    2325#include <libcpu/powerpc-utility.h>
     
    8486{
    8587  rtems_status_code sc = RTEMS_SUCCESSFUL;
     88  unsigned long i = 0;
    8689
    8790  ppc_cpu_id_t myCpu;
     
    128131#endif /* HAS_UBOOT */
    129132
     133  /* Initialize some console parameters */
     134  for (i = 0; i < Console_Port_Count; ++i) {
     135    Console_Port_Tbl [i].ulClock = BSP_bus_frequency;
     136
     137    #ifdef HAS_UBOOT
     138      Console_Port_Tbl [i].pDeviceParams =
     139        (void *) bsp_uboot_board_info.bi_baudrate;
     140    #endif
     141  }
     142
    130143  /* Initialize exception handler */
    131144  sc = ppc_exc_initialize(
Note: See TracChangeset for help on using the changeset viewer.