mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
added framework for chip detection on the ifxmips
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9925 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -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)
|
||||
{
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user