From: blogic Date: Thu, 8 May 2008 07:18:51 +0000 (+0000) Subject: bump ifxmips to 2.6.25.1 X-Git-Url: https://git.rohieb.name/openwrt.git/commitdiff_plain/937b6c47c159f7ed6431c1e8c7a6a762138d6808 bump ifxmips to 2.6.25.1 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11071 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/target/linux/ifxmips/Makefile b/target/linux/ifxmips/Makefile index e63ad086c..19f11eafd 100644 --- a/target/linux/ifxmips/Makefile +++ b/target/linux/ifxmips/Makefile @@ -10,7 +10,7 @@ ARCH:=mips BOARD:=ifxmips BOARDNAME:=Infineon Mips FEATURES:=squashfs jffs2 broken -LINUX_VERSION:=2.6.23.16 +LINUX_VERSION:=2.6.25.1 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/ifxmips/config-2.6.23 b/target/linux/ifxmips/config-2.6.23 deleted file mode 100644 index 4278e2f6b..000000000 --- a/target/linux/ifxmips/config-2.6.23 +++ /dev/null @@ -1,193 +0,0 @@ -CONFIG_32BIT=y -# CONFIG_64BIT is not set -# CONFIG_8139TOO is not set -# CONFIG_ARCH_HAS_ILOG2_U32 is not set -# CONFIG_ARCH_HAS_ILOG2_U64 is not set -# CONFIG_ARCH_SUPPORTS_MSI is not set -# CONFIG_ATM is not set -CONFIG_BASE_SMALL=0 -CONFIG_BITREVERSE=y -# CONFIG_BT is not set -CONFIG_CMDLINE="console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit" -CONFIG_CPU_BIG_ENDIAN=y -CONFIG_CPU_HAS_LLSC=y -CONFIG_CPU_HAS_PREFETCH=y -CONFIG_CPU_HAS_SYNC=y -# CONFIG_CPU_LITTLE_ENDIAN is not set -# CONFIG_CPU_LOONGSON2 is not set -CONFIG_CPU_MIPS32=y -CONFIG_CPU_MIPS32_R1=y -# CONFIG_CPU_MIPS32_R2 is not set -# CONFIG_CPU_MIPS64_R1 is not set -# CONFIG_CPU_MIPS64_R2 is not set -CONFIG_CPU_MIPSR1=y -# CONFIG_CPU_NEVADA is not set -# CONFIG_CPU_R10000 is not set -# CONFIG_CPU_R3000 is not set -# CONFIG_CPU_R4300 is not set -# CONFIG_CPU_R4X00 is not set -# CONFIG_CPU_R5000 is not set -# CONFIG_CPU_R5432 is not set -# CONFIG_CPU_R6000 is not set -# CONFIG_CPU_R8000 is not set -# CONFIG_CPU_RM7000 is not set -# CONFIG_CPU_RM9000 is not set -# CONFIG_CPU_SB1 is not set -CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y -CONFIG_CPU_SUPPORTS_HIGHMEM=y -# CONFIG_CPU_TX39XX is not set -# CONFIG_CPU_TX49XX is not set -# CONFIG_CPU_VR41XX is not set -CONFIG_DEVPORT=y -# CONFIG_DM9000 is not set -CONFIG_DMA_NEED_PCI_MAP_STATE=y -CONFIG_DMA_NONCOHERENT=y -CONFIG_EARLY_PRINTK=y -CONFIG_FS_POSIX_ACL=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set -CONFIG_HAS_DMA=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAVE_STD_PC_SERIAL_PORT=y -# CONFIG_HOSTAP is not set -CONFIG_HW_HAS_PCI=y -CONFIG_HW_RANDOM=y -# CONFIG_I2C is not set -# CONFIG_IDE is not set -CONFIG_IFXMIPS=y -CONFIG_IFXMIPS_ASC_UART=y -CONFIG_IFXMIPS_EEPROM=y -CONFIG_IFXMIPS_GPIO=y -CONFIG_IFXMIPS_LED=y -CONFIG_IFXMIPS_MEI=y -CONFIG_IFXMIPS_MII0=y -# CONFIG_IFXMIPS_MII1 is not set -CONFIG_IFXMIPS_SSC=y -# CONFIG_IFXMIPS_USE_CONSOLE0 is not set -CONFIG_IFXMIPS_USE_CONSOLE1=y -CONFIG_IFXMIPS_WDT=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_IRQ_CPU=y -CONFIG_KALLSYMS=y -# CONFIG_LEDS_ALIX is not set -# CONFIG_LEMOTE_FULONG is not set -# CONFIG_MACH_ALCHEMY is not set -# CONFIG_MACH_DECSTATION is not set -# CONFIG_MACH_JAZZ is not set -# CONFIG_MACH_VR41XX is not set -CONFIG_MIPS=y -# CONFIG_MIPS_ATLAS is not set -# CONFIG_MIPS_COBALT is not set -CONFIG_MIPS_L1_CACHE_SHIFT=5 -# CONFIG_MIPS_MALTA is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_SEAD is not set -# CONFIG_MIPS_SIM is not set -CONFIG_MTD=y -# CONFIG_MTD_ABSENT is not set -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_MTD_BLOCK2MTD is not set -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_AMDSTD=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -CONFIG_MTD_CFI_GEOMETRY=y -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_CFI_INTELEXT is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=y -CONFIG_MTD_CHAR=y -# CONFIG_MTD_CMDLINE_PARTS is not set -CONFIG_MTD_COMPLEX_MAPPINGS=y -# CONFIG_MTD_CONCAT is not set -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set -CONFIG_MTD_GEN_PROBE=y -CONFIG_MTD_IFXMIPS=y -# CONFIG_MTD_JEDECPROBE is not set -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -CONFIG_MTD_MAP_BANK_WIDTH_2=y -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_ONENAND is not set -# CONFIG_MTD_OTP is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_PCI is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_BANKWIDTH=0 -CONFIG_MTD_PHYSMAP_LEN=0x0 -CONFIG_MTD_PHYSMAP_START=0x0 -# CONFIG_MTD_PLATRAM is not set -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_NO_IOPORT is not set -# CONFIG_PAGE_SIZE_16KB is not set -CONFIG_PAGE_SIZE_4KB=y -# CONFIG_PAGE_SIZE_64KB is not set -# CONFIG_PAGE_SIZE_8KB is not set -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_PMC_MSP is not set -# CONFIG_PMC_YOSEMITE is not set -# CONFIG_PNX8550_JBS is not set -# CONFIG_PNX8550_STB810 is not set -# CONFIG_RTC is not set -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_SCSI_WAIT_SCAN=m -# CONFIG_SERIAL_8250 is not set -CONFIG_SERIAL_IFXMIPS=y -# CONFIG_SGI_IP22 is not set -# CONFIG_SGI_IP27 is not set -# CONFIG_SGI_IP32 is not set -# CONFIG_SIBYTE_BIGSUR is not set -# CONFIG_SIBYTE_CARMEL is not set -# CONFIG_SIBYTE_CRHINE is not set -# CONFIG_SIBYTE_CRHONE is not set -# CONFIG_SIBYTE_LITTLESUR is not set -# CONFIG_SIBYTE_PTSWARM is not set -# CONFIG_SIBYTE_RHONE is not set -# CONFIG_SIBYTE_SENTOSA is not set -# CONFIG_SIBYTE_SWARM is not set -# CONFIG_SOFT_WATCHDOG is not set -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SYSVIPC_SYSCTL=y -CONFIG_SYS_HAS_CPU_MIPS32_R1=y -CONFIG_SYS_HAS_EARLY_PRINTK=y -CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y -# CONFIG_TC35815 is not set -# CONFIG_TOSHIBA_JMR3927 is not set -# CONFIG_TOSHIBA_RBTX4927 is not set -# CONFIG_TOSHIBA_RBTX4938 is not set -CONFIG_TRAD_SIGNALS=y -# CONFIG_USBPCWATCHDOG is not set -# CONFIG_USB_EHCI_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_UHCI_HCD is not set -# CONFIG_USER_NS is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIA_RHINE is not set -CONFIG_ZONE_DMA_FLAG=0 diff --git a/target/linux/ifxmips/config-2.6.25 b/target/linux/ifxmips/config-2.6.25 new file mode 100644 index 000000000..eb7cd3a04 --- /dev/null +++ b/target/linux/ifxmips/config-2.6.25 @@ -0,0 +1,212 @@ +CONFIG_32BIT=y +# CONFIG_64BIT is not set +# CONFIG_8139TOO is not set +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_ARCH_POPULATES_NODE_MAP=y +# CONFIG_ARCH_SUPPORTS_MSI is not set +CONFIG_ARCH_SUPPORTS_OPROFILE=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# CONFIG_ATM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_BCM47XX is not set +CONFIG_BITREVERSE=y +# CONFIG_BT is not set +CONFIG_CLASSIC_RCU=y +CONFIG_CMDLINE="console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit" +CONFIG_CPU_BIG_ENDIAN=y +CONFIG_CPU_HAS_LLSC=y +CONFIG_CPU_HAS_PREFETCH=y +CONFIG_CPU_HAS_SYNC=y +# CONFIG_CPU_LITTLE_ENDIAN is not set +# CONFIG_CPU_LOONGSON2 is not set +CONFIG_CPU_MIPS32=y +CONFIG_CPU_MIPS32_R1=y +# CONFIG_CPU_MIPS32_R2 is not set +# CONFIG_CPU_MIPS64_R1 is not set +# CONFIG_CPU_MIPS64_R2 is not set +CONFIG_CPU_MIPSR1=y +# CONFIG_CPU_NEVADA is not set +# CONFIG_CPU_R10000 is not set +# CONFIG_CPU_R3000 is not set +# CONFIG_CPU_R4300 is not set +# CONFIG_CPU_R4X00 is not set +# CONFIG_CPU_R5000 is not set +# CONFIG_CPU_R5432 is not set +# CONFIG_CPU_R6000 is not set +# CONFIG_CPU_R8000 is not set +# CONFIG_CPU_RM7000 is not set +# CONFIG_CPU_RM9000 is not set +# CONFIG_CPU_SB1 is not set +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +# CONFIG_CPU_TX39XX is not set +# CONFIG_CPU_TX49XX is not set +# CONFIG_CPU_VR41XX is not set +CONFIG_CRYPTO_AEAD=m +CONFIG_CRYPTO_AUTHENC=m +CONFIG_CRYPTO_GF128MUL=m +CONFIG_DEVPORT=y +# CONFIG_DM9000 is not set +CONFIG_DMA_NEED_PCI_MAP_STATE=y +CONFIG_DMA_NONCOHERENT=y +CONFIG_EARLY_PRINTK=y +CONFIG_FS_POSIX_ACL=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAVE_IDE=y +# CONFIG_HAVE_KPROBES is not set +# CONFIG_HAVE_KRETPROBES is not set +CONFIG_HAVE_OPROFILE=y +CONFIG_HAVE_STD_PC_SERIAL_PORT=y +# CONFIG_HOSTAP is not set +CONFIG_HW_HAS_PCI=y +CONFIG_HW_RANDOM=y +# CONFIG_I2C is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IDE is not set +CONFIG_IFXMIPS=y +CONFIG_IFXMIPS_MII0=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_IRQ_CPU=y +CONFIG_KALLSYMS=y +# CONFIG_LEDS_ALIX is not set +# CONFIG_LEMOTE_FULONG is not set +CONFIG_LZO_COMPRESS=m +CONFIG_LZO_DECOMPRESS=m +# CONFIG_MACH_ALCHEMY is not set +# CONFIG_MACH_DECSTATION is not set +# CONFIG_MACH_JAZZ is not set +# CONFIG_MACH_VR41XX is not set +# CONFIG_MEMSTICK is not set +CONFIG_MIPS=y +# CONFIG_MIPS_ATLAS is not set +# CONFIG_MIPS_COBALT is not set +CONFIG_MIPS_L1_CACHE_SHIFT=5 +# CONFIG_MIPS_MALTA is not set +CONFIG_MIPS_MT_DISABLED=y +# CONFIG_MIPS_MT_SMP is not set +# CONFIG_MIPS_MT_SMTC is not set +# CONFIG_MIPS_SEAD is not set +# CONFIG_MIPS_SIM is not set +CONFIG_MTD=y +# CONFIG_MTD_ABSENT is not set +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_MTD_BLOCK2MTD is not set +CONFIG_MTD_CFI=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_AMDSTD=y +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set +CONFIG_MTD_CFI_GEOMETRY=y +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_CFI_INTELEXT is not set +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set +CONFIG_MTD_CFI_NOSWAP=y +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +CONFIG_MTD_CHAR=y +# CONFIG_MTD_CMDLINE_PARTS is not set +CONFIG_MTD_COMPLEX_MAPPINGS=y +# CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_GEN_PROBE=y +# CONFIG_MTD_JEDECPROBE is not set +# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +CONFIG_MTD_MAP_BANK_WIDTH_2=y +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_ONENAND is not set +# CONFIG_MTD_OTP is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_PCI is not set +# CONFIG_MTD_PHRAM is not set +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_BANKWIDTH=0 +CONFIG_MTD_PHYSMAP_LEN=0x0 +CONFIG_MTD_PHYSMAP_START=0x0 +# CONFIG_MTD_PLATRAM is not set +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NO_IOPORT is not set +# CONFIG_PAGE_SIZE_16KB is not set +CONFIG_PAGE_SIZE_4KB=y +# CONFIG_PAGE_SIZE_64KB is not set +# CONFIG_PAGE_SIZE_8KB is not set +# CONFIG_PCIPCWATCHDOG is not set +CONFIG_PCI_DOMAINS=y +# CONFIG_PMC_MSP is not set +# CONFIG_PMC_YOSEMITE is not set +# CONFIG_PNX8550_JBS is not set +# CONFIG_PNX8550_STB810 is not set +# CONFIG_R6040 is not set +# CONFIG_RTC is not set +CONFIG_RTC_LIB=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +CONFIG_SCSI_WAIT_SCAN=m +# CONFIG_SERIAL_8250 is not set +CONFIG_SERIAL_IFXMIPS=y +# CONFIG_SGI_IP22 is not set +# CONFIG_SGI_IP27 is not set +# CONFIG_SGI_IP28 is not set +# CONFIG_SGI_IP32 is not set +# CONFIG_SIBYTE_BIGSUR is not set +# CONFIG_SIBYTE_CARMEL is not set +# CONFIG_SIBYTE_CRHINE is not set +# CONFIG_SIBYTE_CRHONE is not set +# CONFIG_SIBYTE_LITTLESUR is not set +# CONFIG_SIBYTE_RHONE is not set +# CONFIG_SIBYTE_SENTOSA is not set +# CONFIG_SIBYTE_SWARM is not set +CONFIG_SLABINFO=y +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_SPARSEMEM_STATIC is not set +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set +CONFIG_SSB_POSSIBLE=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_SYS_HAS_CPU_MIPS32_R1=y +CONFIG_SYS_HAS_EARLY_PRINTK=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y +# CONFIG_TC35815 is not set +# CONFIG_THERMAL is not set +CONFIG_TICK_ONESHOT=y +# CONFIG_TOSHIBA_JMR3927 is not set +# CONFIG_TOSHIBA_RBTX4927 is not set +# CONFIG_TOSHIBA_RBTX4938 is not set +CONFIG_TRAD_SIGNALS=y +# CONFIG_USBPCWATCHDOG is not set +# CONFIG_USB_EHCI_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_UHCI_HCD is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIA_RHINE is not set +CONFIG_VIDEO_V4L2_COMMON=m +CONFIG_ZONE_DMA_FLAG=0 diff --git a/target/linux/ifxmips/files/arch/mips/ifxmips/dma-core.c b/target/linux/ifxmips/files/arch/mips/ifxmips/dma-core.c index f2bbb3446..1c97b16eb 100644 --- a/target/linux/ifxmips/files/arch/mips/ifxmips/dma-core.c +++ b/target/linux/ifxmips/files/arch/mips/ifxmips/dma-core.c @@ -602,7 +602,7 @@ map_dma_chan(_dma_chan_map *map) for (i = 0; i < MAX_DMA_CHANNEL_NUM; i++) { dma_chan[i].irq = map[i].irq; - result = request_irq(dma_chan[i].irq, dma_interrupt, SA_INTERRUPT, "dma-core", (void*)&dma_chan[i]); + result = request_irq(dma_chan[i].irq, dma_interrupt, IRQF_DISABLED, "dma-core", (void*)&dma_chan[i]); if (result) { printk("error, cannot get dma_irq!\n"); diff --git a/target/linux/ifxmips/files/arch/mips/ifxmips/prom.c b/target/linux/ifxmips/files/arch/mips/ifxmips/prom.c index 514c879df..d3009e443 100644 --- a/target/linux/ifxmips/files/arch/mips/ifxmips/prom.c +++ b/target/linux/ifxmips/files/arch/mips/ifxmips/prom.c @@ -67,7 +67,6 @@ prom_printf (const char * fmt, ...) void __init prom_init(void) { - mips_machgroup = MACH_GROUP_IFXMIPS; mips_machtype = MACH_INFINEON_IFXMIPS; strcpy(&(arcs_cmdline[0]), "console=ttyS0,115200 rootfstype=squashfs,jffs2 init=/etc/preinit"); diff --git a/target/linux/ifxmips/files/arch/mips/ifxmips/setup.c b/target/linux/ifxmips/files/arch/mips/ifxmips/setup.c index 4c25b585f..ade78d1bf 100644 --- a/target/linux/ifxmips/files/arch/mips/ifxmips/setup.c +++ b/target/linux/ifxmips/files/arch/mips/ifxmips/setup.c @@ -114,28 +114,9 @@ ifxmips_be_handler(struct pt_regs *regs, int is_fixup) return MIPS_BE_FATAL; } -/* ISR GPTU Timer 6 for high resolution timer */ -static irqreturn_t -ifxmips_timer6_interrupt(int irq, void *dev_id) -{ - timer_interrupt(IFXMIPS_TIMER6_INT, NULL); - - return IRQ_HANDLED; -} - -static struct irqaction hrt_irqaction = { - .handler = ifxmips_timer6_interrupt, - .flags = IRQF_DISABLED, - .name = "hrt", -}; - void __init -plat_timer_setup (struct irqaction *irq) +plat_time_init (void) { - unsigned int retval; - - setup_irq(MIPS_CPU_TIMER_IRQ, irq); - r4k_cur = (read_c0_count() + r4k_offset); write_c0_compare(r4k_cur); @@ -145,17 +126,11 @@ plat_timer_setup (struct irqaction *irq) writel(0xffff, IFXMIPS_GPTU_GPT_CAPREL); writel(0x80C0, IFXMIPS_GPTU_GPT_T6CON); - - //retval = setup_irq(IFXMIPS_TIMER6_INT, &hrt_irqaction); - - if (retval) - { - prom_printf("reqeust_irq failed %d. HIGH_RES_TIMER is diabled\n", IFXMIPS_TIMER6_INT); - } } extern const char* get_system_type (void); +void (*board_time_init)(void); void __init plat_mem_setup (void) { diff --git a/target/linux/ifxmips/files/drivers/char/watchdog/ifxmips_wdt.c b/target/linux/ifxmips/files/drivers/char/watchdog/ifxmips_wdt.c deleted file mode 100644 index d631f4aac..000000000 --- a/target/linux/ifxmips/files/drivers/char/watchdog/ifxmips_wdt.c +++ /dev/null @@ -1,325 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - * - * Copyright (C) 2006 infineon - * Copyright (C) 2007 John Crispin - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define DRVNAME "ifxmips_wdt" - -// TODO remove magic numbers and weirdo macros -extern unsigned int ifxmips_get_fpi_hz (void); - -static int ifxmips_wdt_inuse = 0; -static int ifxmips_wdt_major = 0; - -int -ifxmips_wdt_enable (unsigned int timeout) -{ - unsigned int wdt_cr = 0; - unsigned int wdt_reload = 0; - unsigned int wdt_clkdiv, wdt_pwl, ffpi; - int retval = 0; - - /* clock divider & prewarning limit */ - wdt_clkdiv = 1 << (7 * IFXMIPS_BIU_WDT_CR_CLKDIV_GET(readl(IFXMIPS_BIU_WDT_CR))); - wdt_pwl = 0x8000 >> IFXMIPS_BIU_WDT_CR_PWL_GET(readl(IFXMIPS_BIU_WDT_CR)); - - //TODO - printk("WARNING FUNCTION CALL MISSING!!!"); - //ffpi = cgu_get_io_region_clock(); - printk("cpu clock = %d\n", ffpi); - - /* caculate reload value */ - wdt_reload = (timeout * (ffpi / wdt_clkdiv)) + wdt_pwl; - - printk(KERN_WARNING DRVNAME ": wdt_pwl=0x%x, wdt_clkdiv=%d, ffpi=%d, wdt_reload = 0x%x\n", - wdt_pwl, wdt_clkdiv, ffpi, wdt_reload); - - if (wdt_reload > 0xFFFF) - { - printk(KERN_WARNING DRVNAME ": timeout too large %d\n", timeout); - retval = -EINVAL; - goto out; - } - - /* Write first part of password access */ - writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW1), IFXMIPS_BIU_WDT_CR); - - wdt_cr = readl(IFXMIPS_BIU_WDT_CR); - wdt_cr &= (!IFXMIPS_BIU_WDT_CR_PW_SET(0xff) & - !IFXMIPS_BIU_WDT_CR_PWL_SET(0x3) & - !IFXMIPS_BIU_WDT_CR_CLKDIV_SET(0x3) & - !IFXMIPS_BIU_WDT_CR_RELOAD_SET(0xffff)); - - wdt_cr |= (IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2) | - IFXMIPS_BIU_WDT_CR_PWL_SET(IFXMIPS_BIU_WDT_CR_PWL_GET(readl(IFXMIPS_BIU_WDT_CR))) | - IFXMIPS_BIU_WDT_CR_CLKDIV_SET(IFXMIPS_BIU_WDT_CR_CLKDIV_GET(readl(IFXMIPS_BIU_WDT_CR))) | - IFXMIPS_BIU_WDT_CR_RELOAD_SET(wdt_reload) | - IFXMIPS_BIU_WDT_CR_GEN); - - writel(wdt_cr, IFXMIPS_BIU_WDT_CR); - - printk("watchdog enabled\n"); - -out: - return retval; -} - -void -ifxmips_wdt_disable (void) -{ - writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW1), IFXMIPS_BIU_WDT_CR); - writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2), IFXMIPS_BIU_WDT_CR); - - printk("watchdog disabled\n"); -} - -/* passed LPEN or DSEN */ -void -ifxmips_wdt_enable_feature (int en, int type) -{ - unsigned int wdt_cr = 0; - - writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW1), IFXMIPS_BIU_WDT_CR); - - wdt_cr = readl(IFXMIPS_BIU_WDT_CR); - - if (en) - { - wdt_cr &= (~IFXMIPS_BIU_WDT_CR_PW_SET(0xff)); - wdt_cr |= (IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2) | type); - } else { - wdt_cr &= (~IFXMIPS_BIU_WDT_CR_PW_SET(0xff) & ~type); - wdt_cr |= IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2); - } - - writel(wdt_cr, IFXMIPS_BIU_WDT_CR); -} - -void -ifxmips_wdt_prewarning_limit (int pwl) -{ - unsigned int wdt_cr = 0; - - wdt_cr = readl(IFXMIPS_BIU_WDT_CR); - writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW1), IFXMIPS_BIU_WDT_CR); - - wdt_cr &= 0xf300ffff; - wdt_cr |= (IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2) | IFXMIPS_BIU_WDT_CR_PWL_SET(pwl)); - - /* Set reload value in second password access */ - writel(wdt_cr, IFXMIPS_BIU_WDT_CR); -} - -void -ifxmips_wdt_set_clkdiv (int clkdiv) -{ - unsigned int wdt_cr = 0; - - wdt_cr = readl(IFXMIPS_BIU_WDT_CR); - writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW1), IFXMIPS_BIU_WDT_CR); - - wdt_cr &= 0xfc00ffff; - wdt_cr |= (IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2) | IFXMIPS_BIU_WDT_CR_CLKDIV_SET(clkdiv)); - - /* Set reload value in second password access */ - writel(wdt_cr, IFXMIPS_BIU_WDT_CR); -} - -static int -ifxmips_wdt_ioctl (struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) -{ - int result = 0; - static int timeout = -1; - unsigned int user_arg; - - if ((cmd != IFXMIPS_WDT_IOC_STOP) && (cmd != IFXMIPS_WDT_IOC_PING) && (cmd != IFXMIPS_WDT_IOC_GET_STATUS)) - { - if (copy_from_user((void *) &user_arg, (void *) arg, sizeof (int))){ - result = -EINVAL; - goto out; - } - } - - switch (cmd) - { - case IFXMIPS_WDT_IOC_START: - if ((result = ifxmips_wdt_enable(user_arg)) < 0) - timeout = -1; - else - timeout = user_arg; - break; - - case IFXMIPS_WDT_IOC_STOP: - printk(KERN_INFO DRVNAME ": disable watch dog timer\n"); - ifxmips_wdt_disable(); - break; - - case IFXMIPS_WDT_IOC_PING: - if (timeout < 0) - result = -EIO; - else - result = ifxmips_wdt_enable(timeout); - break; - - case IFXMIPS_WDT_IOC_GET_STATUS: - user_arg = readl(IFXMIPS_BIU_WDT_SR); - copy_to_user((int*)arg, (int*)&user_arg, sizeof(int)); - break; - - case IFXMIPS_WDT_IOC_SET_PWL: - ifxmips_wdt_prewarning_limit(user_arg); - break; - - case IFXMIPS_WDT_IOC_SET_DSEN: - ifxmips_wdt_enable_feature(user_arg, IFXMIPS_BIU_WDT_CR_DSEN); - break; - - case IFXMIPS_WDT_IOC_SET_LPEN: - ifxmips_wdt_enable_feature(user_arg, IFXMIPS_BIU_WDT_CR_LPEN); - break; - - case IFXMIPS_WDT_IOC_SET_CLKDIV: - ifxmips_wdt_set_clkdiv(user_arg); - break; - - default: - printk(KERN_WARNING DRVNAME ": unknown watchdog iotcl\n"); - } - -out: - return result; -} - -static int -ifxmips_wdt_open (struct inode *inode, struct file *file) -{ - if (ifxmips_wdt_inuse) - return -EBUSY; - - ifxmips_wdt_inuse = 1; - - return 0; -} - -static int -ifxmips_wdt_release (struct inode *inode, struct file *file) -{ - ifxmips_wdt_inuse = 0; - - return 0; -} - -int -ifxmips_wdt_register_proc_read (char *buf, char **start, off_t offset, int count, - int *eof, void *data) -{ - int len = 0; - - len += sprintf (buf + len, "IFXMIPS_BIU_WDT_PROC_READ\n"); - len += sprintf (buf + len, "IFXMIPS_BIU_WDT_CR(0x%08x) : 0x%08x\n", - (unsigned int)IFXMIPS_BIU_WDT_CR, readl(IFXMIPS_BIU_WDT_CR)); - len += sprintf (buf + len, "IFXMIPS_BIU_WDT_SR(0x%08x) : 0x%08x\n", - (unsigned int)IFXMIPS_BIU_WDT_SR, readl(IFXMIPS_BIU_WDT_SR)); - - *eof = 1; - - return len; -} - -static const struct file_operations ifxmips_wdt_fops = { - .owner = THIS_MODULE, - .llseek = no_llseek, - .ioctl = ifxmips_wdt_ioctl, - .open = ifxmips_wdt_open, - .release = ifxmips_wdt_release, -// .write = at91_wdt_write, -}; - -static struct miscdevice ifxmips_wdt_miscdev = { - .minor = WATCHDOG_MINOR, - .name = "ifxmips_wdt", - .fops = &ifxmips_wdt_fops, -}; - - -static int -ifxmips_wdt_probe (struct platform_device *pdev) -{ - int ret = misc_register(&ifxmips_wdt_miscdev); - if (ret) - return ret; - - create_proc_read_entry(DRVNAME, 0, NULL, ifxmips_wdt_register_proc_read, NULL); - - printk(KERN_INFO DRVNAME ": ifxmips watchdog loaded\n"); - - return 0; -} - -static int -ifxmips_wdt_remove (struct platform_device *pdev) -{ - misc_deregister(&ifxmips_wdt_miscdev); - remove_proc_entry(DRVNAME, NULL); - return 0; -} - -static struct -platform_driver ifxmips_wdt_driver = { - .probe = ifxmips_wdt_probe, - .remove = ifxmips_wdt_remove, - .driver = { - .name = DRVNAME, - .owner = THIS_MODULE, - }, -}; - -int __init -ifxmips_wdt_init_module (void) -{ - int ret = platform_driver_register(&ifxmips_wdt_driver); - if (ret) - printk(KERN_INFO DRVNAME ": Error registering platfom driver!"); - return ret; -} - -void -ifxmips_wdt_cleanup_module (void) -{ - platform_driver_unregister(&ifxmips_wdt_driver); -} - -module_init(ifxmips_wdt_init_module); -module_exit(ifxmips_wdt_cleanup_module); - -MODULE_AUTHOR("John Crispin "); -MODULE_DESCRIPTION("Watchdog driver for infineon ifxmips family"); -MODULE_LICENSE("GPL"); -MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); diff --git a/target/linux/ifxmips/files/drivers/watchdog/ifxmips_wdt.c b/target/linux/ifxmips/files/drivers/watchdog/ifxmips_wdt.c new file mode 100644 index 000000000..d631f4aac --- /dev/null +++ b/target/linux/ifxmips/files/drivers/watchdog/ifxmips_wdt.c @@ -0,0 +1,325 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * + * Copyright (C) 2006 infineon + * Copyright (C) 2007 John Crispin + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DRVNAME "ifxmips_wdt" + +// TODO remove magic numbers and weirdo macros +extern unsigned int ifxmips_get_fpi_hz (void); + +static int ifxmips_wdt_inuse = 0; +static int ifxmips_wdt_major = 0; + +int +ifxmips_wdt_enable (unsigned int timeout) +{ + unsigned int wdt_cr = 0; + unsigned int wdt_reload = 0; + unsigned int wdt_clkdiv, wdt_pwl, ffpi; + int retval = 0; + + /* clock divider & prewarning limit */ + wdt_clkdiv = 1 << (7 * IFXMIPS_BIU_WDT_CR_CLKDIV_GET(readl(IFXMIPS_BIU_WDT_CR))); + wdt_pwl = 0x8000 >> IFXMIPS_BIU_WDT_CR_PWL_GET(readl(IFXMIPS_BIU_WDT_CR)); + + //TODO + printk("WARNING FUNCTION CALL MISSING!!!"); + //ffpi = cgu_get_io_region_clock(); + printk("cpu clock = %d\n", ffpi); + + /* caculate reload value */ + wdt_reload = (timeout * (ffpi / wdt_clkdiv)) + wdt_pwl; + + printk(KERN_WARNING DRVNAME ": wdt_pwl=0x%x, wdt_clkdiv=%d, ffpi=%d, wdt_reload = 0x%x\n", + wdt_pwl, wdt_clkdiv, ffpi, wdt_reload); + + if (wdt_reload > 0xFFFF) + { + printk(KERN_WARNING DRVNAME ": timeout too large %d\n", timeout); + retval = -EINVAL; + goto out; + } + + /* Write first part of password access */ + writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW1), IFXMIPS_BIU_WDT_CR); + + wdt_cr = readl(IFXMIPS_BIU_WDT_CR); + wdt_cr &= (!IFXMIPS_BIU_WDT_CR_PW_SET(0xff) & + !IFXMIPS_BIU_WDT_CR_PWL_SET(0x3) & + !IFXMIPS_BIU_WDT_CR_CLKDIV_SET(0x3) & + !IFXMIPS_BIU_WDT_CR_RELOAD_SET(0xffff)); + + wdt_cr |= (IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2) | + IFXMIPS_BIU_WDT_CR_PWL_SET(IFXMIPS_BIU_WDT_CR_PWL_GET(readl(IFXMIPS_BIU_WDT_CR))) | + IFXMIPS_BIU_WDT_CR_CLKDIV_SET(IFXMIPS_BIU_WDT_CR_CLKDIV_GET(readl(IFXMIPS_BIU_WDT_CR))) | + IFXMIPS_BIU_WDT_CR_RELOAD_SET(wdt_reload) | + IFXMIPS_BIU_WDT_CR_GEN); + + writel(wdt_cr, IFXMIPS_BIU_WDT_CR); + + printk("watchdog enabled\n"); + +out: + return retval; +} + +void +ifxmips_wdt_disable (void) +{ + writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW1), IFXMIPS_BIU_WDT_CR); + writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2), IFXMIPS_BIU_WDT_CR); + + printk("watchdog disabled\n"); +} + +/* passed LPEN or DSEN */ +void +ifxmips_wdt_enable_feature (int en, int type) +{ + unsigned int wdt_cr = 0; + + writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW1), IFXMIPS_BIU_WDT_CR); + + wdt_cr = readl(IFXMIPS_BIU_WDT_CR); + + if (en) + { + wdt_cr &= (~IFXMIPS_BIU_WDT_CR_PW_SET(0xff)); + wdt_cr |= (IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2) | type); + } else { + wdt_cr &= (~IFXMIPS_BIU_WDT_CR_PW_SET(0xff) & ~type); + wdt_cr |= IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2); + } + + writel(wdt_cr, IFXMIPS_BIU_WDT_CR); +} + +void +ifxmips_wdt_prewarning_limit (int pwl) +{ + unsigned int wdt_cr = 0; + + wdt_cr = readl(IFXMIPS_BIU_WDT_CR); + writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW1), IFXMIPS_BIU_WDT_CR); + + wdt_cr &= 0xf300ffff; + wdt_cr |= (IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2) | IFXMIPS_BIU_WDT_CR_PWL_SET(pwl)); + + /* Set reload value in second password access */ + writel(wdt_cr, IFXMIPS_BIU_WDT_CR); +} + +void +ifxmips_wdt_set_clkdiv (int clkdiv) +{ + unsigned int wdt_cr = 0; + + wdt_cr = readl(IFXMIPS_BIU_WDT_CR); + writel(IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW1), IFXMIPS_BIU_WDT_CR); + + wdt_cr &= 0xfc00ffff; + wdt_cr |= (IFXMIPS_BIU_WDT_CR_PW_SET(IFXMIPS_WDT_PW2) | IFXMIPS_BIU_WDT_CR_CLKDIV_SET(clkdiv)); + + /* Set reload value in second password access */ + writel(wdt_cr, IFXMIPS_BIU_WDT_CR); +} + +static int +ifxmips_wdt_ioctl (struct inode *inode, struct file *file, unsigned int cmd, + unsigned long arg) +{ + int result = 0; + static int timeout = -1; + unsigned int user_arg; + + if ((cmd != IFXMIPS_WDT_IOC_STOP) && (cmd != IFXMIPS_WDT_IOC_PING) && (cmd != IFXMIPS_WDT_IOC_GET_STATUS)) + { + if (copy_from_user((void *) &user_arg, (void *) arg, sizeof (int))){ + result = -EINVAL; + goto out; + } + } + + switch (cmd) + { + case IFXMIPS_WDT_IOC_START: + if ((result = ifxmips_wdt_enable(user_arg)) < 0) + timeout = -1; + else + timeout = user_arg; + break; + + case IFXMIPS_WDT_IOC_STOP: + printk(KERN_INFO DRVNAME ": disable watch dog timer\n"); + ifxmips_wdt_disable(); + break; + + case IFXMIPS_WDT_IOC_PING: + if (timeout < 0) + result = -EIO; + else + result = ifxmips_wdt_enable(timeout); + break; + + case IFXMIPS_WDT_IOC_GET_STATUS: + user_arg = readl(IFXMIPS_BIU_WDT_SR); + copy_to_user((int*)arg, (int*)&user_arg, sizeof(int)); + break; + + case IFXMIPS_WDT_IOC_SET_PWL: + ifxmips_wdt_prewarning_limit(user_arg); + break; + + case IFXMIPS_WDT_IOC_SET_DSEN: + ifxmips_wdt_enable_feature(user_arg, IFXMIPS_BIU_WDT_CR_DSEN); + break; + + case IFXMIPS_WDT_IOC_SET_LPEN: + ifxmips_wdt_enable_feature(user_arg, IFXMIPS_BIU_WDT_CR_LPEN); + break; + + case IFXMIPS_WDT_IOC_SET_CLKDIV: + ifxmips_wdt_set_clkdiv(user_arg); + break; + + default: + printk(KERN_WARNING DRVNAME ": unknown watchdog iotcl\n"); + } + +out: + return result; +} + +static int +ifxmips_wdt_open (struct inode *inode, struct file *file) +{ + if (ifxmips_wdt_inuse) + return -EBUSY; + + ifxmips_wdt_inuse = 1; + + return 0; +} + +static int +ifxmips_wdt_release (struct inode *inode, struct file *file) +{ + ifxmips_wdt_inuse = 0; + + return 0; +} + +int +ifxmips_wdt_register_proc_read (char *buf, char **start, off_t offset, int count, + int *eof, void *data) +{ + int len = 0; + + len += sprintf (buf + len, "IFXMIPS_BIU_WDT_PROC_READ\n"); + len += sprintf (buf + len, "IFXMIPS_BIU_WDT_CR(0x%08x) : 0x%08x\n", + (unsigned int)IFXMIPS_BIU_WDT_CR, readl(IFXMIPS_BIU_WDT_CR)); + len += sprintf (buf + len, "IFXMIPS_BIU_WDT_SR(0x%08x) : 0x%08x\n", + (unsigned int)IFXMIPS_BIU_WDT_SR, readl(IFXMIPS_BIU_WDT_SR)); + + *eof = 1; + + return len; +} + +static const struct file_operations ifxmips_wdt_fops = { + .owner = THIS_MODULE, + .llseek = no_llseek, + .ioctl = ifxmips_wdt_ioctl, + .open = ifxmips_wdt_open, + .release = ifxmips_wdt_release, +// .write = at91_wdt_write, +}; + +static struct miscdevice ifxmips_wdt_miscdev = { + .minor = WATCHDOG_MINOR, + .name = "ifxmips_wdt", + .fops = &ifxmips_wdt_fops, +}; + + +static int +ifxmips_wdt_probe (struct platform_device *pdev) +{ + int ret = misc_register(&ifxmips_wdt_miscdev); + if (ret) + return ret; + + create_proc_read_entry(DRVNAME, 0, NULL, ifxmips_wdt_register_proc_read, NULL); + + printk(KERN_INFO DRVNAME ": ifxmips watchdog loaded\n"); + + return 0; +} + +static int +ifxmips_wdt_remove (struct platform_device *pdev) +{ + misc_deregister(&ifxmips_wdt_miscdev); + remove_proc_entry(DRVNAME, NULL); + return 0; +} + +static struct +platform_driver ifxmips_wdt_driver = { + .probe = ifxmips_wdt_probe, + .remove = ifxmips_wdt_remove, + .driver = { + .name = DRVNAME, + .owner = THIS_MODULE, + }, +}; + +int __init +ifxmips_wdt_init_module (void) +{ + int ret = platform_driver_register(&ifxmips_wdt_driver); + if (ret) + printk(KERN_INFO DRVNAME ": Error registering platfom driver!"); + return ret; +} + +void +ifxmips_wdt_cleanup_module (void) +{ + platform_driver_unregister(&ifxmips_wdt_driver); +} + +module_init(ifxmips_wdt_init_module); +module_exit(ifxmips_wdt_cleanup_module); + +MODULE_AUTHOR("John Crispin "); +MODULE_DESCRIPTION("Watchdog driver for infineon ifxmips family"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); diff --git a/target/linux/ifxmips/files/include/asm-mips/mach-ifxmips/war.h b/target/linux/ifxmips/files/include/asm-mips/mach-ifxmips/war.h new file mode 100644 index 000000000..de3584ecf --- /dev/null +++ b/target/linux/ifxmips/files/include/asm-mips/mach-ifxmips/war.h @@ -0,0 +1,24 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + */ +#ifndef __ASM_MIPS_MACH_IFXMIPS_WAR_H +#define __ASM_MIPS_MACH_IFXMIPS_WAR_H + +#define R4600_V1_INDEX_ICACHEOP_WAR 0 +#define R4600_V1_HIT_CACHEOP_WAR 0 +#define R4600_V2_HIT_CACHEOP_WAR 0 +#define R5432_CP0_INTERRUPT_WAR 0 +#define BCM1250_M3_WAR 0 +#define SIBYTE_1956_WAR 0 +#define MIPS4K_ICACHE_REFILL_WAR 0 +#define MIPS_CACHE_SYNC_WAR 0 +#define TX49XX_ICACHE_INDEX_INV_WAR 0 +#define RM9000_CDEX_SMP_WAR 0 +#define ICACHE_REFILLS_WORKAROUND_WAR 0 +#define R10000_LLSC_WAR 0 +#define MIPS34K_MISSED_ITLB_WAR 0 + +#endif diff --git a/target/linux/ifxmips/patches/100-board.patch b/target/linux/ifxmips/patches/100-board.patch index 89b706ca4..909474905 100644 --- a/target/linux/ifxmips/patches/100-board.patch +++ b/target/linux/ifxmips/patches/100-board.patch @@ -1,66 +1,57 @@ -Index: linux-2.6.23/arch/mips/Kconfig +Index: linux-2.6.25/arch/mips/Kconfig =================================================================== ---- linux-2.6.23.orig/arch/mips/Kconfig 2007-10-16 22:12:19.000000000 +0200 -+++ linux-2.6.23/arch/mips/Kconfig 2007-10-16 22:12:21.000000000 +0200 -@@ -58,6 +58,17 @@ +--- linux-2.6.25.orig/arch/mips/Kconfig 2008-05-05 08:35:34.000000000 +0100 ++++ linux-2.6.25/arch/mips/Kconfig 2008-05-05 08:35:46.000000000 +0100 +@@ -78,6 +78,17 @@ select SYS_SUPPORTS_LITTLE_ENDIAN select GENERIC_HARDIRQS_NO__DO_IRQ +config IFXMIPS -+ bool "IFXMips support" -+ select DMA_NONCOHERENT -+ select IRQ_CPU -+ select SYS_HAS_CPU_MIPS32_R1 -+ select HAVE_STD_PC_SERIAL_PORT -+ select SYS_SUPPORTS_BIG_ENDIAN -+ select SYS_SUPPORTS_32BIT_KERNEL -+ select SYS_HAS_EARLY_PRINTK -+ select HW_HAS_PCI ++ bool "IFXMips support" ++ select DMA_NONCOHERENT ++ select IRQ_CPU ++ select SYS_HAS_CPU_MIPS32_R1 ++ select HAVE_STD_PC_SERIAL_PORT ++ select SYS_SUPPORTS_BIG_ENDIAN ++ select SYS_SUPPORTS_32BIT_KERNEL ++ select SYS_HAS_EARLY_PRINTK ++ select HW_HAS_PCI + config MACH_DECSTATION bool "DECstations" select BOOT_ELF32 -@@ -605,6 +615,7 @@ - source "arch/mips/tx4927/Kconfig" - source "arch/mips/tx4938/Kconfig" - source "arch/mips/vr41xx/Kconfig" -+source "arch/mips/ifxmips/Kconfig" - - endmenu - -Index: linux-2.6.23/arch/mips/Makefile +Index: linux-2.6.25/arch/mips/Makefile =================================================================== ---- linux-2.6.23.orig/arch/mips/Makefile 2007-10-16 22:12:21.000000000 +0200 -+++ linux-2.6.23/arch/mips/Makefile 2007-10-16 22:12:21.000000000 +0200 -@@ -276,6 +276,13 @@ +--- linux-2.6.25.orig/arch/mips/Makefile 2008-05-05 08:35:35.000000000 +0100 ++++ linux-2.6.25/arch/mips/Makefile 2008-05-05 08:35:46.000000000 +0100 +@@ -282,6 +282,13 @@ cflags-$(CONFIG_MIPS_COBALT) += -Iinclude/asm-mips/mach-cobalt load-$(CONFIG_MIPS_COBALT) += 0xffffffff80080000 +# +# Infineon IFXMIPS +# -+core-$(CONFIG_IFXMIPS) += arch/mips/ifxmips/ -+cflags-$(CONFIG_IFXMIPS) += -Iinclude/asm-mips/mach-ifxmips -+load-$(CONFIG_IFXMIPS) += 0xffffffff80002000 -+ ++core-$(CONFIG_IFXMIPS) += arch/mips/ifxmips/ ++cflags-$(CONFIG_IFXMIPS) += -Iinclude/asm-mips/mach-ifxmips ++load-$(CONFIG_IFXMIPS) += 0xffffffff80002000 ++ # # DECstation family # -Index: linux-2.6.23/include/asm-mips/bootinfo.h +Index: linux-2.6.25/include/asm-mips/bootinfo.h =================================================================== ---- linux-2.6.23.orig/include/asm-mips/bootinfo.h 2007-10-16 22:12:19.000000000 +0200 -+++ linux-2.6.23/include/asm-mips/bootinfo.h 2007-10-16 22:12:21.000000000 +0200 -@@ -208,6 +208,13 @@ - #define MACH_GROUP_WINDRIVER 28 /* Windriver boards */ - #define MACH_WRPPMC 1 +--- linux-2.6.25.orig/include/asm-mips/bootinfo.h 2008-05-05 08:35:35.000000000 +0100 ++++ linux-2.6.25/include/asm-mips/bootinfo.h 2008-05-05 08:35:46.000000000 +0100 +@@ -94,6 +94,12 @@ + #define MACH_MSP7120_FPGA 5 /* PMC-Sierra MSP7120 Emulation */ + #define MACH_MSP_OTHER 255 /* PMC-Sierra unknown board type */ -+/* -+ * Valid machtype for group ATHEROS -+ */ -+#define MACH_GROUP_IFXMIPS 29 -+#define MACH_INFINEON_IFXMIPS 0 -+ ++/* ++ * Valid machtype for group IFXMIPS ++ */ ++#define MACH_GROUP_IFXMIPS 29 ++#define MACH_INFINEON_IFXMIPS 0 + #define CL_SIZE COMMAND_LINE_SIZE - const char *get_system_type(void); + extern char *system_type; diff --git a/target/linux/ifxmips/patches/110-drivers.patch b/target/linux/ifxmips/patches/110-drivers.patch index fdb305b7d..9ce88f232 100644 --- a/target/linux/ifxmips/patches/110-drivers.patch +++ b/target/linux/ifxmips/patches/110-drivers.patch @@ -1,41 +1,34 @@ -Index: linux-2.6.23/drivers/serial/Kconfig +Index: linux-2.6.25/drivers/char/Makefile =================================================================== ---- linux-2.6.23.orig/drivers/serial/Kconfig 2007-12-22 20:21:04.563793426 +0100 -+++ linux-2.6.23/drivers/serial/Kconfig 2007-12-22 20:21:08.848037572 +0100 -@@ -1259,4 +1259,10 @@ - Currently, only 8250 compatible ports are supported, but - others can easily be added. +--- linux-2.6.25.orig/drivers/char/Makefile 2008-05-07 18:58:25.000000000 +0100 ++++ linux-2.6.25/drivers/char/Makefile 2008-05-07 18:58:42.000000000 +0100 +@@ -112,6 +112,12 @@ + obj-$(CONFIG_JS_RTC) += js-rtc.o + js-rtc-y = rtc.o -+config SERIAL_IFXMIPS -+ bool "IFXMips serial driver" -+ depends on IFXMIPS -+ help -+ Driver for the ifxmipss built in ASC hardware ++obj-$(CONFIG_IFXMIPS_LED) += ifxmips_led.o ++obj-$(CONFIG_IFXMIPS_GPIO) += ifxmips_gpio.o ++obj-$(CONFIG_IFXMIPS_SSC) += ifxmips_ssc.o ++obj-$(CONFIG_IFXMIPS_EEPROM) += ifxmips_eeprom.o ++obj-$(CONFIG_IFXMIPS_MEI) += ifxmips_mei_core.o + - endmenu -Index: linux-2.6.23/drivers/serial/Makefile -=================================================================== ---- linux-2.6.23.orig/drivers/serial/Makefile 2007-12-22 20:21:04.571793884 +0100 -+++ linux-2.6.23/drivers/serial/Makefile 2007-12-22 20:21:08.852037801 +0100 -@@ -64,3 +64,4 @@ - obj-$(CONFIG_SERIAL_NETX) += netx-serial.o - obj-$(CONFIG_SERIAL_OF_PLATFORM) += of_serial.o - obj-$(CONFIG_SERIAL_KS8695) += serial_ks8695.o -+obj-$(CONFIG_SERIAL_IFXMIPS) += ifxmips_asc.o -Index: linux-2.6.23/drivers/mtd/maps/Makefile + # Files generated that shall be removed upon make clean + clean-files := consolemap_deftbl.c defkeymap.c + +Index: linux-2.6.25/drivers/mtd/maps/Makefile =================================================================== ---- linux-2.6.23.orig/drivers/mtd/maps/Makefile 2007-12-22 20:21:04.579794340 +0100 -+++ linux-2.6.23/drivers/mtd/maps/Makefile 2007-12-22 20:21:08.860038256 +0100 -@@ -71,3 +71,4 @@ +--- linux-2.6.25.orig/drivers/mtd/maps/Makefile 2008-05-07 18:58:25.000000000 +0100 ++++ linux-2.6.25/drivers/mtd/maps/Makefile 2008-05-07 18:58:42.000000000 +0100 +@@ -68,3 +68,4 @@ obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o - obj-$(CONFIG_MTD_TQM834x) += tqm834x.o -+obj-$(CONFIG_MTD_IFXMIPS) += ifxmips.o -Index: linux-2.6.23/drivers/net/Kconfig + obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o ++obj-$(CONFIG_MTD_IFXMIPS) += ifxmips.o +Index: linux-2.6.25/drivers/net/Kconfig =================================================================== ---- linux-2.6.23.orig/drivers/net/Kconfig 2007-12-22 20:21:08.035991295 +0100 -+++ linux-2.6.23/drivers/net/Kconfig 2007-12-22 20:21:08.860038256 +0100 -@@ -339,6 +339,18 @@ +--- linux-2.6.25.orig/drivers/net/Kconfig 2008-05-07 18:58:41.000000000 +0100 ++++ linux-2.6.25/drivers/net/Kconfig 2008-05-07 18:58:42.000000000 +0100 +@@ -351,6 +351,12 @@ source "drivers/net/arm/Kconfig" @@ -44,51 +37,48 @@ Index: linux-2.6.23/drivers/net/Kconfig + depends on IFXMIPS + help + Support for the MII0 inside the IFXMips SOC -+ -+config IFXMIPS_MII1 -+ tristate "Infineon IFXMips eth1 driver" -+ depends on IFXMIPS -+ help -+ Support for the MII1 inside the IFXMips SOC + config AX88796 tristate "ASIX AX88796 NE2000 clone support" - depends on ARM || MIPS -Index: linux-2.6.23/drivers/net/Makefile + depends on ARM || MIPS || SUPERH +Index: linux-2.6.25/drivers/serial/Kconfig =================================================================== ---- linux-2.6.23.orig/drivers/net/Makefile 2007-12-22 20:21:08.039991524 +0100 -+++ linux-2.6.23/drivers/net/Makefile 2007-12-22 20:21:08.860038256 +0100 -@@ -208,6 +208,7 @@ - obj-$(CONFIG_FEC_8XX) += fec_8xx/ - obj-$(CONFIG_PASEMI_MAC) += pasemi_mac.o - obj-$(CONFIG_MLX4_CORE) += mlx4/ -+obj-$(CONFIG_IFXMIPS_MII0) += ifxmips_mii0.o - - obj-$(CONFIG_MACB) += macb.o +--- linux-2.6.25.orig/drivers/serial/Kconfig 2008-05-07 18:58:25.000000000 +0100 ++++ linux-2.6.25/drivers/serial/Kconfig 2008-05-08 07:53:18.000000000 +0100 +@@ -1327,6 +1327,14 @@ + Currently, only 8250 compatible ports are supported, but + others can easily be added. -Index: linux-2.6.23/drivers/char/watchdog/Makefile ++config SERIAL_IFXMIPS ++ bool "IFXMips serial driver" ++ depends on IFXMIPS ++ select SERIAL_CORE ++ select SERIAL_CORE_CONSOLE ++ help ++ Driver for the ifxmipss built in ASC hardware ++ + config SERIAL_QE + tristate "Freescale QUICC Engine serial port support" + depends on QUICC_ENGINE +Index: linux-2.6.25/drivers/serial/Makefile =================================================================== ---- linux-2.6.23.orig/drivers/char/watchdog/Makefile 2007-12-22 20:21:04.599795479 +0100 -+++ linux-2.6.23/drivers/char/watchdog/Makefile 2007-12-22 20:21:08.880039396 +0100 -@@ -90,6 +90,7 @@ - obj-$(CONFIG_INDYDOG) += indydog.o - obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o - obj-$(CONFIG_WDT_RM9K_GPI) += rm9k_wdt.o +--- linux-2.6.25.orig/drivers/serial/Makefile 2008-05-07 18:58:25.000000000 +0100 ++++ linux-2.6.25/drivers/serial/Makefile 2008-05-07 18:58:42.000000000 +0100 +@@ -66,4 +66,5 @@ + obj-$(CONFIG_SERIAL_NETX) += netx-serial.o + obj-$(CONFIG_SERIAL_OF_PLATFORM) += of_serial.o + obj-$(CONFIG_SERIAL_KS8695) += serial_ks8695.o ++obj-$(CONFIG_SERIAL_IFXMIPS) += ifxmips_asc.o + obj-$(CONFIG_SERIAL_QE) += ucc_uart.o +Index: linux-2.6.25/drivers/watchdog/Makefile +=================================================================== +--- linux-2.6.25.orig/drivers/watchdog/Makefile 2008-05-07 18:58:25.000000000 +0100 ++++ linux-2.6.25/drivers/watchdog/Makefile 2008-05-07 18:58:42.000000000 +0100 +@@ -96,6 +96,7 @@ + obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o + obj-$(CONFIG_AR7_WDT) += ar7_wdt.o + obj-$(CONFIG_TXX9_WDT) += txx9wdt.o +obj-$(CONFIG_IFXMIPS_WDT) += ifxmips_wdt.o # PARISC Architecture -Index: linux-2.6.23/drivers/char/Makefile -=================================================================== ---- linux-2.6.23.orig/drivers/char/Makefile 2007-12-22 20:21:04.611796164 +0100 -+++ linux-2.6.23/drivers/char/Makefile 2007-12-24 15:04:56.849129757 +0100 -@@ -135,3 +135,9 @@ - rm $@.tmp - - endif -+ -+obj-$(CONFIG_IFXMIPS_LED) += ifxmips_led.o -+obj-$(CONFIG_IFXMIPS_GPIO) += ifxmips_gpio.o -+obj-$(CONFIG_IFXMIPS_SSC) += ifxmips_ssc.o -+obj-$(CONFIG_IFXMIPS_EEPROM) += ifxmips_eeprom.o -+obj-$(CONFIG_IFXMIPS_MEI) += ifxmips_mei_core.o diff --git a/target/linux/ifxmips/patches/160-cfi-swap.patch b/target/linux/ifxmips/patches/160-cfi-swap.patch index 116503f65..6ddfc7e23 100644 --- a/target/linux/ifxmips/patches/160-cfi-swap.patch +++ b/target/linux/ifxmips/patches/160-cfi-swap.patch @@ -1,15 +1,16 @@ -Index: linux-2.6.23/drivers/mtd/chips/cfi_cmdset_0002.c +Index: linux-2.6.25/drivers/mtd/chips/cfi_cmdset_0002.c =================================================================== ---- linux-2.6.23.orig/drivers/mtd/chips/cfi_cmdset_0002.c 2007-11-02 23:02:29.000000000 +0100 -+++ linux-2.6.23/drivers/mtd/chips/cfi_cmdset_0002.c 2007-11-02 23:07:15.000000000 +0100 -@@ -1007,7 +1007,9 @@ - int ret = 0; - map_word oldd; +--- linux-2.6.25.orig/drivers/mtd/chips/cfi_cmdset_0002.c 2008-05-07 18:58:41.000000000 +0100 ++++ linux-2.6.25/drivers/mtd/chips/cfi_cmdset_0002.c 2008-05-07 18:58:42.000000000 +0100 +@@ -1015,7 +1015,9 @@ int retry_cnt = 0; + + adr += chip->start; - +#ifdef CONFIG_IFXMIPS + adr ^= 2; +#endif - adr += chip->start; - spin_lock(chip->mutex); + ret = get_chip(map, chip, adr, FL_WRITING); + if (ret) { +