Support enable/disable of devices to reduce size
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1176 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
4bf1919ff2
commit
4ed3af567c
@ -56,9 +56,16 @@
|
|||||||
|
|
||||||
/* Is there a serial console? */
|
/* Is there a serial console? */
|
||||||
|
|
||||||
#if defined(CONFIG_SCI0_SERIAL_CONSOLE) || defined(CONFIG_SCI1_SERIAL_CONSOLE)
|
#if defined(CONFIG_SCI0_SERIAL_CONSOLE) && defined(CONFIG_SH1_SCI0)
|
||||||
# define HAVE_CONSOLE
|
# define HAVE_CONSOLE 1
|
||||||
|
# undef CONFIG_SCI1_SERIAL_CONSOLE
|
||||||
|
#elif defined(CONFIG_SCI1_SERIAL_CONSOLE) && defined(CONFIG_SH1_SCI1)
|
||||||
|
# define HAVE_CONSOLE 1
|
||||||
|
# undef CONFIG_SCI0_SERIAL_CONSOLE
|
||||||
#else
|
#else
|
||||||
|
# if defined(CONFIG_SCI0_SERIAL_CONSOLE) || defined(CONFIG_SCI1_SERIAL_CONSOLE)
|
||||||
|
# error "Serial console selected, but corresponding SCI not enabled"
|
||||||
|
# endif
|
||||||
# undef HAVE_CONSOLE
|
# undef HAVE_CONSOLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -166,10 +173,12 @@
|
|||||||
*
|
*
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONSOLE
|
||||||
int inline up_txready(void)
|
int inline up_txready(void)
|
||||||
{
|
{
|
||||||
return getreg8(SH1_SCI_BASE + SH1_SCI_SSR_OFFSET) & SH1_SCISSR_TDRE;
|
return getreg8(SH1_SCI_BASE + SH1_SCI_SSR_OFFSET) & SH1_SCISSR_TDRE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
|
@ -53,19 +53,36 @@
|
|||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Some sanity checks *******************************************************/
|
/* Some sanity checks *******************************************************/
|
||||||
|
|
||||||
|
/* Are there any SCIs? */
|
||||||
|
|
||||||
|
#if !defined(CONFIG_SH1_SCI0) && !defined(CONFIG_SH1_SCI1)
|
||||||
|
# ifdef CONFIG_USE_SERIALDRIVER
|
||||||
|
# error "Serial driver selected, but SCIs not enabled"
|
||||||
|
# endif
|
||||||
|
# undef HAVE_CONSOLE
|
||||||
|
# undef CONFIG_USE_SERIALDRIVER
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USE_SERIALDRIVER
|
||||||
|
|
||||||
/* Is there a serial console? */
|
/* Is there a serial console? */
|
||||||
|
|
||||||
#if defined(CONFIG_SCI0_SERIAL_CONSOLE) || defined(CONFIG_SCI1_SERIAL_CONSOLE)
|
#if defined(CONFIG_SCI0_SERIAL_CONSOLE) && defined(CONFIG_SH1_SCI0)
|
||||||
# define HAVE_CONSOLE
|
# define HAVE_CONSOLE 1
|
||||||
|
# undef CONFIG_SCI1_SERIAL_CONSOLE
|
||||||
|
#elif defined(CONFIG_SCI1_SERIAL_CONSOLE) && defined(CONFIG_SH1_SCI1)
|
||||||
|
# define HAVE_CONSOLE 1
|
||||||
|
# undef CONFIG_SCI0_SERIAL_CONSOLE
|
||||||
#else
|
#else
|
||||||
|
# if defined(CONFIG_SCI0_SERIAL_CONSOLE) || defined(CONFIG_SCI1_SERIAL_CONSOLE)
|
||||||
|
# error "Serial console selected, but corresponding SCI not enabled"
|
||||||
|
# endif
|
||||||
# undef HAVE_CONSOLE
|
# undef HAVE_CONSOLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -85,6 +85,20 @@ CONFIG_ARCH_STACKDUMP=y
|
|||||||
#
|
#
|
||||||
# SH-1 specific boot/build settings
|
# SH-1 specific boot/build settings
|
||||||
#
|
#
|
||||||
|
CONFIG_SH1_DMAC0=n
|
||||||
|
CONFIG_SH1_DMAC1=n
|
||||||
|
CONFIG_SH1_DMAC2=n
|
||||||
|
CONFIG_SH1_DMAC3=n
|
||||||
|
CONFIG_SH1_ITU1=n
|
||||||
|
CONFIG_SH1_ITU2=n
|
||||||
|
CONFIG_SH1_ITU3=n
|
||||||
|
CONFIG_SH1_ITU4=n
|
||||||
|
CONFIG_SH1_SCI0=y
|
||||||
|
CONFIG_SH1_SCI1=y
|
||||||
|
CONFIG_SH1_PCU=n
|
||||||
|
CONFIG_SH1_AD=n
|
||||||
|
CONFIG_SH1_WDT=n
|
||||||
|
CONFIG_SH1_CMI=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# SH1 specific device driver settings
|
# SH1 specific device driver settings
|
||||||
|
Loading…
Reference in New Issue
Block a user