mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
[ifxmips] refresh 2.6.33 patches, add more mach support, add crypto support, tbd. mach/board detection
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21159 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -10,6 +10,18 @@ choice
|
||||
bool "Danube/Twinpass"
|
||||
select SOC_DANUBE
|
||||
|
||||
config IFXMIPS_ASE
|
||||
bool "Amazon-SE"
|
||||
select SOC_ASE
|
||||
|
||||
config IFXMIPS_AR9
|
||||
bool "AR9"
|
||||
select SOC_AR9
|
||||
|
||||
config IFXMIPS_VR9
|
||||
bool "VR9"
|
||||
select SOC_VR9
|
||||
|
||||
endchoice
|
||||
|
||||
source "arch/mips/ifxmips/danube/Kconfig"
|
||||
@@ -32,6 +44,60 @@ config SOC_DANUBE
|
||||
select SWAP_IO_SPACE
|
||||
select MIPS_MACHINE
|
||||
|
||||
config SOC_ASE
|
||||
bool
|
||||
select DMA_NONCOHERENT
|
||||
select IRQ_CPU
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_HAS_CPU_MIPS32_R2
|
||||
select HAVE_STD_PC_SERIAL_PORT
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_MULTITHREADING
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select HW_HAS_PCI
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select SWAP_IO_SPACE
|
||||
select MIPS_MACHINE
|
||||
|
||||
config SOC_AR9
|
||||
bool
|
||||
select DMA_NONCOHERENT
|
||||
select IRQ_CPU
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_HAS_CPU_MIPS32_R2
|
||||
select HAVE_STD_PC_SERIAL_PORT
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_MULTITHREADING
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select HW_HAS_PCI
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select SWAP_IO_SPACE
|
||||
select MIPS_MACHINE
|
||||
|
||||
config SOC_VR9
|
||||
bool
|
||||
select DMA_NONCOHERENT
|
||||
select IRQ_CPU
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_HAS_CPU_MIPS32_R2
|
||||
select HAVE_STD_PC_SERIAL_PORT
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_MULTITHREADING
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select HW_HAS_PCI
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select SWAP_IO_SPACE
|
||||
select MIPS_MACHINE
|
||||
|
||||
if EARLY_PRINTK
|
||||
menu "Infineon SoC settings"
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <linux/etherdevice.h>
|
||||
|
||||
#include <asm/bootinfo.h>
|
||||
#include <machine.h>
|
||||
|
||||
#include <ifxmips.h>
|
||||
#include <ifxmips_prom.h>
|
||||
@@ -65,8 +66,12 @@ out:
|
||||
}
|
||||
__setup("ethaddr", ifxmips_set_ethaddr);
|
||||
|
||||
void __init
|
||||
prom_init(void)
|
||||
static void __init prom_detect_machtype(void)
|
||||
{
|
||||
mips_machtype = IFXMIPS_MACH_EASY50712;
|
||||
}
|
||||
|
||||
static void __init prom_init_cmdline(void)
|
||||
{
|
||||
int argc = fw_arg0;
|
||||
char **argv = (char **) fw_arg1;
|
||||
@@ -129,3 +134,10 @@ prom_init(void)
|
||||
|
||||
add_memory_region(0x00000000, memsize, BOOT_MEM_RAM);
|
||||
}
|
||||
|
||||
void __init
|
||||
prom_init(void)
|
||||
{
|
||||
prom_detect_machtype();
|
||||
prom_init_cmdline();
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
obj-y := dma-core.o irq.o ebu.o setup.o devices.o cgu.o
|
||||
obj-$(CONFIG_IFXMIPS_ARCAYDIAN_BRNBOOT) += arcaydian.o
|
||||
obj-$(CONFIG_DANUBE_MACH_ARV452) += mach-arv452.o
|
||||
obj-$(CONFIG_DANUBE_MACH_EASY50712) += mach-easy50712.o
|
||||
obj-$(CONFIG_DANUBE_MACH_EASY4010) += mach-easy4010.o
|
||||
|
||||
@@ -75,7 +75,7 @@ static struct resource danube_ethernet_resources =
|
||||
|
||||
static struct platform_device danube_ethernet =
|
||||
{
|
||||
.name = "danube_ethernet",
|
||||
.name = "ifxmips_mii0",
|
||||
.resource = &danube_ethernet_resources,
|
||||
.num_resources = 1,
|
||||
.dev = {
|
||||
|
||||
@@ -167,4 +167,4 @@ arv452_init(void)
|
||||
MIPS_MACHINE(IFXMIPS_MACH_ARV452,
|
||||
"ARV452",
|
||||
"Airties WAV-281, Arcor A800",
|
||||
arv452_init);
|
||||
arv452_init);
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio_buttons.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#include <machine.h>
|
||||
#include <ifxmips_prom.h>
|
||||
|
||||
#include "devices.h"
|
||||
|
||||
extern unsigned char ifxmips_ethaddr[6];
|
||||
|
||||
#ifdef CONFIG_MTD_PARTITIONS
|
||||
static struct mtd_partition easy4010_partitions[] =
|
||||
{
|
||||
{
|
||||
.name = "uboot",
|
||||
.offset = 0x0,
|
||||
.size = 0x40000,
|
||||
},
|
||||
{
|
||||
.name = "uboot_env",
|
||||
.offset = 0x40000,
|
||||
.size = 0x10000,
|
||||
},
|
||||
{
|
||||
.name = "kernel",
|
||||
.offset = 0x0,
|
||||
.size = 0x0,
|
||||
},
|
||||
{
|
||||
.name = "rootfs",
|
||||
.offset = 0x0,
|
||||
.size = 0x0,
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct physmap_flash_data easy4010_flash_data = {
|
||||
#ifdef CONFIG_MTD_PARTITIONS
|
||||
.nr_parts = ARRAY_SIZE(easy4010_partitions),
|
||||
.parts = easy4010_partitions,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct gpio_led easy4010_leds[] = {
|
||||
{ .name = "ifx:green:test0", .gpio = 0,},
|
||||
{ .name = "ifx:green:test1", .gpio = 1,},
|
||||
{ .name = "ifx:green:test2", .gpio = 2,},
|
||||
{ .name = "ifx:green:test3", .gpio = 3,},
|
||||
};
|
||||
|
||||
static void __init
|
||||
easy4010_init(void)
|
||||
{
|
||||
ifxmips_register_gpio();
|
||||
|
||||
ifxmips_register_gpio_dev();
|
||||
|
||||
ifxmips_register_mtd(&easy4010_flash_data);
|
||||
|
||||
ifxmips_register_leds(easy4010_leds, ARRAY_SIZE(easy4010_leds));
|
||||
|
||||
ifxmips_register_wdt();
|
||||
|
||||
danube_register_ethernet(ifxmips_ethaddr);
|
||||
|
||||
danube_register_usb();
|
||||
}
|
||||
|
||||
MIPS_MACHINE(IFXMIPS_MACH_EASY4010,
|
||||
"EASY4010",
|
||||
"Lantiq Twinpass Eval Board",
|
||||
easy4010_init);
|
||||
@@ -0,0 +1,80 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio_buttons.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#include <machine.h>
|
||||
#include <ifxmips_prom.h>
|
||||
|
||||
#include "devices.h"
|
||||
|
||||
extern unsigned char ifxmips_ethaddr[6];
|
||||
|
||||
#ifdef CONFIG_MTD_PARTITIONS
|
||||
static struct mtd_partition easy50712_partitions[] =
|
||||
{
|
||||
{
|
||||
.name = "uboot",
|
||||
.offset = 0x0,
|
||||
.size = 0x40000,
|
||||
},
|
||||
{
|
||||
.name = "uboot_env",
|
||||
.offset = 0x40000,
|
||||
.size = 0x10000,
|
||||
},
|
||||
{
|
||||
.name = "kernel",
|
||||
.offset = 0x0,
|
||||
.size = 0x0,
|
||||
},
|
||||
{
|
||||
.name = "rootfs",
|
||||
.offset = 0x0,
|
||||
.size = 0x0,
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct physmap_flash_data easy50712_flash_data = {
|
||||
#ifdef CONFIG_MTD_PARTITIONS
|
||||
.nr_parts = ARRAY_SIZE(easy50712_partitions),
|
||||
.parts = easy50712_partitions,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct gpio_led easy50712_leds[] = {
|
||||
{ .name = "ifx:green:test0", .gpio = 0,},
|
||||
{ .name = "ifx:green:test1", .gpio = 1,},
|
||||
{ .name = "ifx:green:test2", .gpio = 2,},
|
||||
{ .name = "ifx:green:test3", .gpio = 3,},
|
||||
};
|
||||
|
||||
static void __init
|
||||
easy50712_init(void)
|
||||
{
|
||||
ifxmips_register_gpio();
|
||||
|
||||
//printk("ifxmips_register_gpio_dev\n");
|
||||
//ifxmips_register_gpio_dev();
|
||||
|
||||
ifxmips_register_mtd(&easy50712_flash_data);
|
||||
|
||||
ifxmips_register_leds(easy50712_leds, ARRAY_SIZE(easy50712_leds));
|
||||
|
||||
ifxmips_register_wdt();
|
||||
|
||||
danube_register_ethernet(ifxmips_ethaddr);
|
||||
|
||||
danube_register_usb();
|
||||
}
|
||||
|
||||
MIPS_MACHINE(IFXMIPS_MACH_EASY50712,
|
||||
"EASY50712",
|
||||
"Lantiq Eval Board",
|
||||
easy50712_init);
|
||||
@@ -1,11 +1,21 @@
|
||||
#include <asm/mips_machine.h>
|
||||
|
||||
enum ramips_mach_type {
|
||||
enum ifxmips_mach_type {
|
||||
IFXMIPS_MACH_GENERIC,
|
||||
|
||||
/* Danube based machines */
|
||||
IFXMIPS_MACH_EASY50712, /* danube evalkit */
|
||||
/* Danube/Twinpass based machines */
|
||||
IFXMIPS_MACH_EASY50712, /* Danube evalkit */
|
||||
IFXMIPS_MACH_EASY4010, /* Twinpass evalkit */
|
||||
IFXMIPS_MACH_ARV4519, /* Airties WAV-221 */
|
||||
IFXMIPS_MACH_ARV452, /* Airties WAV-281, Arcor EasyboxA800 */
|
||||
|
||||
/* ASE based machines */
|
||||
IFXMIPS_MACH_EASY50601, /* ASE wave board */
|
||||
|
||||
/* AR9 based machines */
|
||||
IFXMIPS_MACH_EASY50822, /* AR9 eval board */
|
||||
|
||||
/* VR9 based machines */
|
||||
IFXMIPS_MACH_EASY80920, /* VRX200 eval board */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user