mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-26 02:50:49 +02:00
make the serial poirt used by prom.c configurable for ifxmips
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11606 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
9cfdd6b07a
commit
9309132bb9
@ -84,6 +84,8 @@ CONFIG_IFXMIPS=y
|
|||||||
CONFIG_IFXMIPS_EEPROM=y
|
CONFIG_IFXMIPS_EEPROM=y
|
||||||
CONFIG_IFXMIPS_MEI=y
|
CONFIG_IFXMIPS_MEI=y
|
||||||
CONFIG_IFXMIPS_MII0=y
|
CONFIG_IFXMIPS_MII0=y
|
||||||
|
# CONFIG_IFXMIPS_PROM_ASC0 is not set
|
||||||
|
CONFIG_IFXMIPS_PROM_ASC1=y
|
||||||
CONFIG_IFXMIPS_SSC=y
|
CONFIG_IFXMIPS_SSC=y
|
||||||
CONFIG_IFXMIPS_WDT=y
|
CONFIG_IFXMIPS_WDT=y
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
|
@ -18,5 +18,19 @@ config IFXMIPS_MEI
|
|||||||
bool "IFXMips mei"
|
bool "IFXMips mei"
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "prom_printf ASC"
|
||||||
|
help
|
||||||
|
Choose which serial port is used, until the console driver is loaded
|
||||||
|
|
||||||
|
config IFXMIPS_PROM_ASC0
|
||||||
|
bool "ASC0"
|
||||||
|
|
||||||
|
config IFXMIPS_PROM_ASC1
|
||||||
|
bool "ASC1"
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
@ -26,16 +26,22 @@ static char buf[1024];
|
|||||||
unsigned int *prom_cp1_base = NULL;
|
unsigned int *prom_cp1_base = NULL;
|
||||||
unsigned int prom_cp1_size = 0;
|
unsigned int prom_cp1_size = 0;
|
||||||
|
|
||||||
|
#ifdef IFXMIPS_PROM_ASC0
|
||||||
|
#define IFXMIPS_ASC_DIFF 0
|
||||||
|
#else
|
||||||
|
#define IFXMIPS_ASC_DIFF IFXMIPS_ASC_BASE_DIFF
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline u32
|
static inline u32
|
||||||
asc_r32(unsigned long r)
|
asc_r32(unsigned long r)
|
||||||
{
|
{
|
||||||
return ifxmips_r32((u32*)(IFXMIPS_ASC_BASE_ADDR + IFXMIPS_ASC_BASE_DIFF + r));
|
return ifxmips_r32((u32*)(IFXMIPS_ASC_BASE_ADDR + IFXMIPS_ASC_DIFF + r));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
asc_w32(u32 v, unsigned long r)
|
asc_w32(u32 v, unsigned long r)
|
||||||
{
|
{
|
||||||
ifxmips_w32(v, (u32*)(IFXMIPS_ASC_BASE_ADDR + IFXMIPS_ASC_BASE_DIFF + r));
|
ifxmips_w32(v, (u32*)(IFXMIPS_ASC_BASE_ADDR + IFXMIPS_ASC_DIFF + r));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user