diff options
Diffstat (limited to 'target/linux/ifxmips/files/arch/mips/ifxmips/board.c')
-rw-r--r-- | target/linux/ifxmips/files/arch/mips/ifxmips/board.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/target/linux/ifxmips/files/arch/mips/ifxmips/board.c b/target/linux/ifxmips/files/arch/mips/ifxmips/board.c index 6df17d855..05a0715d1 100644 --- a/target/linux/ifxmips/files/arch/mips/ifxmips/board.c +++ b/target/linux/ifxmips/files/arch/mips/ifxmips/board.c @@ -33,9 +33,19 @@ #include <asm/time.h> #include <asm/irq.h> #include <asm/io.h> +#include <asm/ifxmips/ifxmips.h> #define MAX_IFXMIPS_DEVS 5 +#define BOARD_DANUBE "Danube" +#define BOARD_DANUBE_CHIPID 0x10129083 + +#define BOARD_TWINPASS "Twinpass" + +#define BOARD_DANUBE "Danube" + +static unsigned int chiprev; + static struct platform_device *ifxmips_devs[MAX_IFXMIPS_DEVS]; static struct platform_device ifxmips_led[] = @@ -62,6 +72,19 @@ static struct platform_device ifxmips_mii[] = }, }; +const char* +get_system_type (void) +{ + chiprev = readl(IFXMIPS_MPS_CHIPID); + switch(chiprev) + { + case BOARD_DANUBE_CHIPID: + return BOARD_DANUBE; + } + + return BOARD_SYSTEM_TYPE; +} + int __init ifxmips_init_devices(void) { /* |