mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
lots of ifxmips cleanups
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11596 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -2,24 +2,10 @@
|
||||
|
||||
menu "IFXMips built-in"
|
||||
|
||||
config IFXMIPS_ASC_UART
|
||||
bool "IFXMips asc uart"
|
||||
select SERIAL_CORE
|
||||
select SERIAL_CORE_CONSOLE
|
||||
default y
|
||||
|
||||
config MTD_IFXMIPS
|
||||
bool "IFXMips flash map"
|
||||
default y
|
||||
|
||||
config IFXMIPS_WDT
|
||||
bool "IFXMips watchdog"
|
||||
default y
|
||||
|
||||
config IFXMIPS_LED
|
||||
bool "IFXMips led"
|
||||
default y
|
||||
|
||||
config IFXMIPS_SSC
|
||||
bool "IFXMips ssc"
|
||||
default y
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/ifxmips/ifxmips.h>
|
||||
|
||||
#define MAX_IFXMIPS_DEVS 7
|
||||
#define MAX_IFXMIPS_DEVS 9
|
||||
|
||||
#define BOARD_DANUBE "Danube"
|
||||
#define BOARD_DANUBE_CHIPID 0x10129083
|
||||
@@ -79,6 +79,24 @@ ifxmips_wdt[] =
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device
|
||||
ifxmips_asc0[] =
|
||||
{
|
||||
{
|
||||
.id = 0,
|
||||
.name = "ifxmips_asc",
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device
|
||||
ifxmips_asc1[] =
|
||||
{
|
||||
{
|
||||
.id = 1,
|
||||
.name = "ifxmips_asc",
|
||||
},
|
||||
};
|
||||
|
||||
static struct physmap_flash_data
|
||||
ifxmips_mtd_data = {
|
||||
.width = 2,
|
||||
@@ -155,6 +173,8 @@ ifxmips_init_devices(void)
|
||||
ifxmips_devs[dev++] = ifxmips_mii;
|
||||
ifxmips_devs[dev++] = ifxmips_mtd;
|
||||
ifxmips_devs[dev++] = ifxmips_wdt;
|
||||
//ifxmips_devs[dev++] = ifxmips_asc0;
|
||||
ifxmips_devs[dev++] = ifxmips_asc1;
|
||||
#ifdef CONFIG_GPIO_DEVICE
|
||||
ifxmips_devs[dev++] = ifxmips_gpio_dev;
|
||||
#endif
|
||||
|
||||
@@ -413,3 +413,19 @@ cgu_get_clockout(int clkout)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cgu_setup_pci_clk(int external_clock)
|
||||
{
|
||||
//set clock to 33Mhz
|
||||
ifxmips_w32(ifxmips_r32(IFXMIPS_CGU_IFCCR) & ~0xf00000, IFXMIPS_CGU_IFCCR);
|
||||
ifxmips_w32(ifxmips_r32(IFXMIPS_CGU_IFCCR) | 0x800000, IFXMIPS_CGU_IFCCR);
|
||||
// internal or external clock
|
||||
if(external_clock)
|
||||
{
|
||||
ifxmips_w32(ifxmips_r32(IFXMIPS_CGU_IFCCR) & ~ (1 << 16), IFXMIPS_CGU_IFCCR);
|
||||
ifxmips_w32((1 << 30), IFXMIPS_CGU_PCICR);
|
||||
} else {
|
||||
ifxmips_w32(ifxmips_r32(IFXMIPS_CGU_IFCCR) | (1 << 16), IFXMIPS_CGU_IFCCR);
|
||||
ifxmips_w32((1 << 31) | (1 << 30), IFXMIPS_CGU_PCICR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,8 +125,7 @@ prom_init(void)
|
||||
memsize -= prom_cp1_size;
|
||||
prom_cp1_base = (unsigned int*)(0xA0000000 + (memsize * 1024 * 1024));
|
||||
|
||||
prom_printf(KERN_INFO "Using %dMB Ram and reserving %dMB for cp1\n",
|
||||
memsize, prom_cp1_size);
|
||||
prom_printf("Using %dMB Ram and reserving %dMB for cp1\n", memsize, prom_cp1_size);
|
||||
memsize *= 1024 * 1024;
|
||||
|
||||
if(!*arcs_cmdline)
|
||||
|
||||
Reference in New Issue
Block a user