aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris
Commit message (Collapse)AuthorAgeFilesLines
* CRIS v32: Update and simplify kernel/irq.c.Jesper Nilsson2008-02-081-81/+193
| | | | | | | | - First timer register has changed name to timer0. - Build IRQs with only IRQ number, mask bit will be calculated instead. - Add more IRQs, up to 64 supported. - Use arrays to hold which IRQs triggered instead of trying to do magic with two 32 bit values now that more than 32 IRQs are supported.
* CRIS v32: Update kernel/head.SJesper Nilsson2008-02-081-88/+114
| | | | | | | | | | - Shorten include paths for machine specific header files. - Add magic for booting NAND flash. - Change CONFIG_ETRAXFS_SIM to CONFIG_ETRAX_VCS_SIM. - Use assembler macros for initializing hardware (clocks) - Add stubs for SMP slave CPUs. - Search for cramfs or jffs2 if no romfs found. - Initialize l2cache.
* CRIS v32: Update and improve fasttimer.cJesper Nilsson2008-02-081-324/+195
| | | | | | | | | | | | | | | - Change include path to machine dependent header files. - Remove __INLINE__, it expands to inline anyway. - Don't initialize static variables. - Change timers to use fasttimer_t instead of timevals. - Change name of timeval_cmp to fasttime_cmp to highlight this. - Register name for first timer is regi_timer0, not regi_timer. - Whitespace and formatting changes. - Don't return if we're blocking interrupts, goto done and restore interrupts. - Disable interrupts while walking the fasttimer list, only restore while doing the callback. - Remove #ifdef DECLARE_WAITQUEUE, this code won't be used in another OS. - Remove CVS log.
* CRIS v32: Update debugport.Jesper Nilsson2008-02-081-299/+43
| | | | | | | | | | - Shorten include paths to machine dependent headers. - Add support for fifth serial port. - Remove CONFIG_ETRAXFS_SIM and CONFIG_ETRAX_DEBUG_PORT_NULL, no longer used. - Remove raw_printk and stupid_debug hack, no longer needed. - Remove dummy console stuff, no longer needed. - Correct some register type names. - Correct some whitespace errors and formatting.
* CRIS v32: Update boot/rescue/head.S code.Jesper Nilsson2008-02-081-27/+15
| | | | | | - Add ifdef for ETRAX_AXISFLASHMAP to avoid compiling file unless it is set. - Use assembler macros for setting up clocks. - Don't copy image, just jump to it (only works for NOR flash)
* CRIS v32: Update boot/compressed/misc.cJesper Nilsson2008-02-081-19/+53
| | | | | | | | | | - Shorten include paths to machine specific headers. - Remove fill_inbuf, not defined here. - Return __dest as value from memcpy. - Enable serial port hardware transmitter and receiver in serial_setup. - Correct baudrate divisor calculation, changed from 4800 to 115200. - Add support for Artpec-3 specific serial port setup. - Initialize pinmux for the correct serial port.
* CRIS v32: Update compressed head.SJesper Nilsson2008-02-081-98/+39
| | | | | | - Fixes for NAND and NOR flash booting. - Use assembler macros for common tasks (clocks, general io etc) - Use (EtraxFS or Artpec-3) machine specific include for dram and hardware init.
* CRIS v32: Remove common gpio and nandflash, add mach-fs and mach-a3 as subdirs.Jesper Nilsson2008-02-081-2/+3
| | | | | Also add board_mmcspi to build if ETRAX_SPI_MMC_BOARD is set. (Generic MMC SPI implementation)
* CRIS v32: Update boot rescue Kbuild makefile.Jesper Nilsson2008-02-081-25/+16
| | | | | | - Remove old specific targets, use more generic ones instead. - Use if_changed to avoid creating new images when no change. - Use EXTRA_CFLAGS instead of CFLAGS.
* CRIS v32: Update boot compressed Kbuild makefile.Jesper Nilsson2008-02-081-28/+17
| | | | | | - Remove old specific targets, use more generic ones instead. - Use if_changed to avoid creating new images when no change. - Use KBUILD_CFLAGS instead of CFLAGS.
* CRIS v32: Update boot Kbuild makefile.Jesper Nilsson2008-02-081-8/+15
| | | | | - Remove old specific targets, use more generic ones instead. - Use if_changed to avoid creating new images when no change.
* CRIS v32: Update traps.cJesper Nilsson2008-02-081-103/+95
| | | | | | | | | - Remove raw_prink hack, use oops_in_progress instead. - When ETRAX_WATCHDOG_NICE_DOGGY is set, loop in trap after oops dump instead of rebooting. - Break long lines to less than 80 chars. - Fix whitespace errors. - Remove unnecessary comments.
* CRIS v10: Update and improve axisflashmap.cJesper Nilsson2008-02-081-144/+37
| | | | | | | | - Add config to use mtd0 as whole flash device. - Fix whitespace errors. - Remove braces around single statement ifs. - Break long lines. - Remove unnecessary CVS log.
* CRIS v10: Update rescue head.sJesper Nilsson2008-02-081-56/+61
| | | | | - Correct whitespace problems. - Add ifdef for ETRAX_AXISFLASHMAP to avoid compile error when not set.
* CRIS v10: Update rescue Kbuild makefile.Jesper Nilsson2008-02-081-37/+19
| | | | | | | - Remove old specific targets, use more generic ones instead. - Use if_changed to avoid creating new images when no change. Removes a lot of cruft. - Use EXTRA_CFLAGS instead of CFLAGS.
* CRIS v10: Update boot/compressed Kbuild makefile.Jesper Nilsson2008-02-081-29/+19
| | | | | | - Remove old specific targets, use more generic ones instead. - Use if_changed to avoid creating new images when no change. - Use EXTRA_CFLAGS instead of CFLAGS.
* CRIS v10: Update boot Kbuild makefile.Jesper Nilsson2008-02-081-8/+16
| | | | - Remove old specific targets, use more generic ones instead.
* CRIS: Update main Kbuild makefile.Jesper Nilsson2008-02-081-69/+70
| | | | | | | | - Remove old and non-generic targets, use generic ones instead. - Add sub-arch as mach-fs or mach-a3 for EtraxFS and Artpec-3 respectively. - Add links to sub-arch directories, and erase before trying to create them. - Include from sub-arch specific include directory "mach". - Add files to be cleaned in CLEAN_FILES instead of as archclean target.
* CRIS v32: Update and improve axisflashmapJesper Nilsson2008-02-081-143/+345
| | | | | | - Use default partition table when no partition is found (for initial tests) - Add config ETRAX_AXISFLASHMAP_MTD0WHOLE to allow whole flash as mtd0. - Add config for VCS simulator connection.
* CRIS v32: New version of I2C driver.Jesper Nilsson2008-02-082-14/+187
| | | | | | | | - Add i2c_write and i2c_read as functions. - Use spinlocks for critical regions. - Add config item to set I2C data and clock port. - Put unneeded testcode inside #if 0. - Remove CVS id tag.
* CRIS v32: Fixup kernel Makefile.Jesper Nilsson2008-02-081-3/+2
| | | | | | | - Remove CRISv32 common arbiter, dma, io and pinmux files, they are now defined in machine dependent directories. - Add cache and cacheflush files for working around cache problems in CRISv32 chips.
* CRIS v32: Update entry.S to working order.Jesper Nilsson2008-02-081-18/+63
| | | | | | | - Remove oldset parameter. - Utilise delay-slot for parameter moving. - Add kernel_execve as break 13. - Add new kernel syscalls.
* CRIS v32: Whitespace and formatting changes for kernel/ptrace.cJesper Nilsson2008-02-082-5/+8
|
* CRIS: Minor generic kernel/traps.c changes.Jesper Nilsson2008-02-081-87/+139
| | | | | | | - Collect extern declarations at top of file. - Change raw_printk to printk, use oops_in_progress instead. - Fix formatting and whitespace. - Allow the watchdog to be disabled during oops.
* CRIS: Minor fixes to mm/fault.cJesper Nilsson2008-02-081-141/+28
| | | | | | | - Only disallow oops if we're in_interrupt context (was in_atomic before) - Use the generic oops_in_progress instead of the raw_printk hack. - Fix whitespace/formatting. - Remove CVS log entries.
* CRIS: Remove unnecessary CVS log from cris/mm/init.cJesper Nilsson2008-02-081-111/+0
|
* CRIS v32: Update synchronous serial driver.Jesper Nilsson2008-02-081-341/+599
| | | | | Now uses a DMA descriptor ring, which should avoid any unnecessary pauses in the streams.
* CRIS v32: Add L2 cache initialization code.Jesper Nilsson2008-02-081-0/+29
|
* CRIS v32: Add hardware dependent include files and defconfigs for ETRAX FS ↵Jesper Nilsson2008-02-082-0/+1169
| | | | | | | | and ARTPEC-3 chips. The header files describe the hardware registers available in both these chips, note that most of this documentation is automatically generated from the hardware implementation.
* CRIS v32: Add new machine dependent files for Etrax-FS and Artpec-3.Jesper Nilsson2008-02-0823-186/+3470
| | | | | | | | The two chips are somewhat different, and needs different handling. Adds handing of the dma, dram initialization, hardware settings, io, memory arbiter and pinmux Also moves the dma, dram initialization and io from CRIS v32 common files.
* CRIS v32: Add new driver files for Etrax-FSJesper Nilsson2008-02-083-0/+1149
| | | | Adds gpio and nandflash handling for Etrax-FS
* CRIS v32: Add new driver files for Artpec-3.Jesper Nilsson2008-02-083-0/+1168
| | | | Adds gpio and nandflash handling for Artpec-3.
* CRIS: Rearrange Kconfigs for v10 and v32 to allow compilation without warnings.Jesper Nilsson2008-02-085-536/+988
| | | | | | | | | | | - Remove some unneeded configs and add some new ones. - Merge common config items to common file instead of duplicating them. - Pull in standard Kconfig.preempt. - Remove some unneeded Kconfigs for subsystems not (yet) available on CRIS (md, scsi, ieee1394, i2o, isdn, telephony, media, pcmcia, pci) - Rename CRISv32 config items which had different types from CRISv10. (ETRAX_LED2G, ETRAX_LED2R, ETRAX_LED3G, ETRAX_LED3R, ETRAX_I2C_DATA_PORT, ETRAX_I2C_CLK_PORT)
* Introduce flags for reserve_bootmem()Bernhard Walle2008-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patchset adds a flags variable to reserve_bootmem() and uses the BOOTMEM_EXCLUSIVE flag in crashkernel reservation code to detect collisions between crashkernel area and already used memory. This patch: Change the reserve_bootmem() function to accept a new flag BOOTMEM_EXCLUSIVE. If that flag is set, the function returns with -EBUSY if the memory already has been reserved in the past. This is to avoid conflicts. Because that code runs before SMP initialisation, there's no race condition inside reserve_bootmem_core(). [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: fix powerpc build] Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: <linux-arch@vger.kernel.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* arch/cris: add a missing iounmapJulia Lawall2008-02-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An extra error handling label is needed for the case where the ioremap has succeeded. The problem was detected using the following semantic match (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ type T,T1,T2; identifier E; statement S; expression x1,x2; constant C; int ret; @@ T E; ... * E = ioremap(...); if (E == NULL) S ... when != iounmap(E) when != if (E != NULL) { ... iounmap(E); ...} when != x1 = (T1)E if (...) { ... when != iounmap(E) when != if (E != NULL) { ... iounmap(E); ...} when != x2 = (T2)E ( * return; | * return C; | * return ret; ) } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* CRIS: avoid using arch links in KconfigJesper Nilsson2008-02-055-2/+19
| | | | | | | | | | | | | | | | Improve including of architecture dependent Kconfig files. - Always include the architecture dependent Kconfig files. - Wrap architecture dependent Kconfig files inside an appropriate "if ETRAX_ARCH_Vxx" block. This makes it possible to run the configuration even without the arch links, which are created later in the build process. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* timerfd: new timerfd APIDavide Libenzi2008-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the new timerfd API as it is implemented by the following patch: int timerfd_create(int clockid, int flags); int timerfd_settime(int ufd, int flags, const struct itimerspec *utmr, struct itimerspec *otmr); int timerfd_gettime(int ufd, struct itimerspec *otmr); The timerfd_create() API creates an un-programmed timerfd fd. The "clockid" parameter can be either CLOCK_MONOTONIC or CLOCK_REALTIME. The timerfd_settime() API give new settings by the timerfd fd, by optionally retrieving the previous expiration time (in case the "otmr" parameter is not NULL). The time value specified in "utmr" is absolute, if the TFD_TIMER_ABSTIME bit is set in the "flags" parameter. Otherwise it's a relative time. The timerfd_gettime() API returns the next expiration time of the timer, or {0, 0} if the timerfd has not been set yet. Like the previous timerfd API implementation, read(2) and poll(2) are supported (with the same interface). Here's a simple test program I used to exercise the new timerfd APIs: http://www.xmailserver.org/timerfd-test2.c [akpm@linux-foundation.org: coding-style cleanups] [akpm@linux-foundation.org: fix ia64 build] [akpm@linux-foundation.org: fix m68k build] [akpm@linux-foundation.org: fix mips build] [akpm@linux-foundation.org: fix alpha, arm, blackfin, cris, m68k, s390, sparc and sparc64 builds] [heiko.carstens@de.ibm.com: fix s390] [akpm@linux-foundation.org: fix powerpc build] [akpm@linux-foundation.org: fix sparc64 more] Signed-off-by: Davide Libenzi <davidel@xmailserver.org> Cc: Michael Kerrisk <mtk-manpages@gmx.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Davide Libenzi <davidel@xmailserver.org> Cc: Michael Kerrisk <mtk-manpages@gmx.net> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Move Kconfig.instrumentation to arch/Kconfig and init/KconfigMathieu Desnoyers2008-02-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | Move the instrumentation Kconfig to arch/Kconfig for architecture dependent options - oprofile - kprobes and init/Kconfig for architecture independent options - profiling - markers Remove the "Instrumentation Support" menu. Everything moves to "General setup". Delete the kernel/Kconfig.instrumentation file. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* all archs: consolidate init and exit sections in vmlinux.lds.hSam Ravnborg2008-01-282-8/+8
| | | | | | | | | | | This patch consolidate all definitions of .init.text, .init.data and .exit.text, .exit.data section definitions in the generic vmlinux.lds.h. This is a preparational patch - alone it does not buy us much good. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* CRIS: Remove 'TOPDIR' from MakefilesWANG Cong2008-01-281-1/+1
| | | | | | | | | | | This patch removes TOPDIR from Cris Makefiles. Cc: Mikael Starvik <starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Andreas Schwab <schwab@suse.de> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
* Kobject: the cris iop_fw_load.c code is brokenGreg Kroah-Hartman2008-01-241-0/+11
| | | | | | | | | | | | | | | | | | This code is really really really broken. So much so that it's almost impossible to fix with a simple patch, so just comment out the offending registration with the kobject core, and mark the driver as broken. The problem is that the code is trying to register a "raw" struct device, which is not allowed. struct device is only for use within the driver model. This is being done to try to use the firmware layer which wants a struct device. To properly fix this, use something easy, like a platform device, which is a struct device and can be used for this kind of thing. Cc: Mikael Starvik <starvik@axis.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* CRIS: add missed local_irq_restore callCyrill Gorcunov2008-01-211-0/+1
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
* CRIS v10: vmlinux.lds.S: ix kernel oops on boot and use common definesJesper Nilsson2008-01-171-18/+15
| | | | | | | | | | | | | | | | | | | | | | - Move alignment to page size of init data outside ifdef for BLK_DEV_INITRD. The reservation up to page size of memory after init data was previously not done if BLK_DEV_INITRD was undefined. This caused a kernel oops when init memory pages were freed after startup, data placed in the same page as the last init memory would also be freed and reused, with disastrous results. - Use macros for initcalls and .text sections. - Replace hardcoded page size constant with PAGE_SIZE define. - Change include/asm-cris/page.h to use the _AC macro to instead of testing __ASSEMBLY__. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* CRIS v10: driver for ds1302 needs to include cris-specific i2c.hJesper Nilsson2008-01-141-128/+3
| | | | | | | | | | This fixes compilation error where i2c_init wasn't defined. Also, remove the CVS log and version tags, they are no longer useful. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* CRIS v10: kernel/time.c needs to include linux/vmstat.h to compileJesper Nilsson2008-01-141-0/+1
| | | | | | | | | | | This fixes compile error when nr_free_pages() from linux/swap.h expands to global_page_state(NR_FREE_PAGES), but linux/vmstat.h isn't included to declare global_page_state(). Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* CRIS v10: correct do_signal to fix oops and clean up signal handling in generalJesper Nilsson2008-01-141-139/+112
| | | | | | | | | | | | | | | | | | | This fixes a kernel panic on boot due to do_signal not being compatible with it's callers. - do_signal now returns void, and does not have the previous signal set as a parameter. - Remove sys_rt_sigsuspend, we can use the common one instead. - Change sys_sigsuspend to be more like x86, don't call do_signal here. - handle_signal, setup_frame and setup_rt_frame now return -EFAULT if we've delivered a segfault, which is used by callers to perform necessary cleanup. - Break long lines, correct whitespace and formatting errors. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ide: move CONFIG_IDE_ETRAX to drivers/ide/KconfigBartlomiej Zolnierkiewicz2007-11-272-51/+0
| | | | | | | | | | | | | | | * Move ETRAX_IDE and friends from arch/cris/arch-{v10,v32}/drivers/Kconfig to drivers/ide/Kconfig. * Don't force selecting ide-disk and ide-cd device drivers (please handle this through defconfig if necessary). * Make ETRAX_IDE depend on BROKEN for the time being (it doesn't even compile currently). Cc: Mikael Starvik <starvik@axis.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* CRISv10 fasttimer: Scrap INLINE and name timeval_cmp betterJesper Nilsson2007-11-141-9/+7
| | | | | | | | | | | | | | Scrap the local __INLINE__ macro, and rename timeval_cmp to fasttime_cmp. Inline macro was completely unnecessary since the macro was defined locally to be inline. timeval_cmp was inaccurately named since it does comparison on struct fasttimer_t and not on struct timeval. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* CRISv10 memset library add lineendings to asmJesper Nilsson2007-11-141-41/+41
| | | | | | | | | | | | | | Add \n\ at end of lines inside asm statement to avoid warning. No change except adding \n\ to end of line and correcting whitespace has been done. Removes warning about multi-line string literals when compiling arch/cris/arch-v10/lib/memset.c Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* CRISv10 string library add lineendings to asmJesper Nilsson2007-11-141-27/+27
| | | | | | | | | | | | | | Add \n\ at end of lines inside asm statement to avoid warning. No change except adding \n\ to end of line and correcting whitespace has been done. Removes warning about multi-line string literals when compiling arch/cris/arch-v10/lib/string.c Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>