summaryrefslogtreecommitdiffstats
path: root/target/linux/ifxmips/files/arch
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-06-28 22:01:37 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-06-28 22:01:37 +0000
commit9309132bb9c4f6af333ae2e6d96d370ba2e9bf1a (patch)
treed183bcf4d3312dcfcb185308e51fa22863426f6b /target/linux/ifxmips/files/arch
parent9cfdd6b07ab48b39de9c3ca9e0e9bcfc66d44037 (diff)
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
Diffstat (limited to 'target/linux/ifxmips/files/arch')
-rw-r--r--target/linux/ifxmips/files/arch/mips/ifxmips/Kconfig14
-rw-r--r--target/linux/ifxmips/files/arch/mips/ifxmips/prom.c10
2 files changed, 22 insertions, 2 deletions
diff --git a/target/linux/ifxmips/files/arch/mips/ifxmips/Kconfig b/target/linux/ifxmips/files/arch/mips/ifxmips/Kconfig
index 3e68f7f9b..d4e96af32 100644
--- a/target/linux/ifxmips/files/arch/mips/ifxmips/Kconfig
+++ b/target/linux/ifxmips/files/arch/mips/ifxmips/Kconfig
@@ -18,5 +18,19 @@ config IFXMIPS_MEI
bool "IFXMips mei"
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
diff --git a/target/linux/ifxmips/files/arch/mips/ifxmips/prom.c b/target/linux/ifxmips/files/arch/mips/ifxmips/prom.c
index 4e307d044..cbfcb75f0 100644
--- a/target/linux/ifxmips/files/arch/mips/ifxmips/prom.c
+++ b/target/linux/ifxmips/files/arch/mips/ifxmips/prom.c
@@ -26,16 +26,22 @@ static char buf[1024];
unsigned int *prom_cp1_base = NULL;
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
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
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