Ignore:
Timestamp:
Mar 9, 2016, 6:48:39 PM (4 years ago)
Author:
Joel Sherrill <joel@…>
Branches:
master
Children:
81df701a
Parents:
efbf6c9
git-author:
Joel Sherrill <joel@…> (03/09/16 18:48:39)
git-committer:
Joel Sherrill <joel@…> (03/10/16 16:38:46)
Message:

pc386: Add --disable-com1-com4 boot argument

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/console/console_select.c

    refbf6c9 r22bbb9f1  
    3131  #include <crt.h>
    3232#endif
     33
     34/*
     35 * Forward prototype
     36 */
     37extern bool pc386_com1_com4_enabled(int);
     38
     39/*
     40 * This method is used to determine if COM1-COM4 are enabled based upon
     41 * boot command line arguments.
     42 */
     43static bool are_com1_com4_enabled;
     44
     45bool pc386_com1_com4_enabled(int minor)
     46{
     47  return are_com1_com4_enabled;
     48}
    3349
    3450/*
     
    102118
    103119  return false;
     120}
     121
     122static void parse_com1_com4_enable(void)
     123{
     124  static const char *opt;
     125
     126  /*
     127   * Check the command line to see if com1-com4 are disabled.
     128   */
     129  opt = bsp_cmdline_arg("--disable-com1-com4");
     130  if ( opt ) {
     131    printk( "Disable COM1-COM4 per boot argument\n" );
     132    are_com1_com4_enabled = false;
     133  } else {
     134    are_com1_com4_enabled = true;
     135  }
    104136}
    105137
     
    199231
    200232  /*
     233   * Determine if COM1-COM4 were disabled.
     234   */
     235  parse_com1_com4_enable();
     236
     237  /*
    201238   * Assume that if only --console is specified, that printk() should
    202239   * follow that selection by default.
Note: See TracChangeset for help on using the changeset viewer.