summaryrefslogtreecommitdiff
path: root/arch/cris/arch-v32/drivers
AgeCommit message (Collapse)Author
2009-03-30trivial: fix typos/grammar errors in Kconfig textsMatt LaPlante
Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-06chris: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: Jesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-29[CRIS] Move header files from include to arch/cris/include.Jesper Nilsson
Change all users of header files to correct path. Remove some unneeded headers for arch-v32. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-10-20cris: use bcd2bin/bin2bcdAdrian Bunk
Change cris to use the new bcd2bin/bin2bcd functions instead of the obsolete BCD_TO_BIN/BIN_TO_BCD macros. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Chris Zankel <zankel@tensilica.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-28Merge branch 'linus' into core/generic-dma-coherentIngo Molnar
Conflicts: arch/x86/Kconfig Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-21Merge branch 'for-linus' of git://www.jni.nu/crisLinus Torvalds
* 'for-linus' of git://www.jni.nu/cris: [CRISv10] Clean up compressed/misc.c [CRISv10] Correct whitespace damage. [CRIS] Correct definition of subdirs for install_headers. [CRIS] Correct image makefiles to allow using a separate OBJ-directory. [CRIS] Build fixes for compressed and rescue images for v10 and v32: It looks at least odd to apply spin_unlock to a mutex. cris: compile fixes for 2.6.26-rc5
2008-07-20Cris: convert to using generic dma-coherent mem allocatorDmitry Baryshkov
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-06-29It looks at least odd to apply spin_unlock to a mutex.Julia Lawall
The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @def@ declarer DEFINE_MUTEX; identifier m; @@ DEFINE_MUTEX(m); @@ identifier def.m; @@ ( - spin_lock(&m) + mutex_lock(&m) | - spin_unlock(&m) + mutex_unlock(&m) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-06-20Add a bunch of cycle_kernel_lock() callsJonathan Corbet
All of the open() functions which don't need the BKL on their face may still depend on its acquisition to serialize opens against driver initialization. So make those functions acquire then release the BKL to be on the safe side. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20Add "no BKL needed" comments to several driversJonathan Corbet
This documents the fact that somebody looked at the relevant open() functions and concluded that, due to their trivial nature, no locking was needed. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-05-18cris: cdev lock_kernel() pushdownJonathan Corbet
Push the cdev lock_kernel() call into cris drivers. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-02-08CRIS v32: Change drivers/i2c.c locking.Jesper Nilsson
- Change spin_lock + local_irq_save into spin_lock_irqsave - Change spin_unlock + local_irq_restore into spin_unlock_irqrestore - Return ENOTTY if ioctl is not recognized as a cris ioctl. - Make init functions static.
2008-02-08CRIS v32: Rewrite ARTPEC-3 gpio driver to avoid volatiles and general cleanup.Jesper Nilsson
Changes as suggested by Andrew Morton, plus general cleanup to ease later consolidation of driver into machine common driver. - Correct parameter type of gpio_write to const char __user * - Remove volatile from the arrays of machine dependent registers, use readl and writel to access them instead. - Remove useless casts of void. - Use spin_lock_irqsave for locking. - Break gpio_write into smaller sub-functions. - Remove useless breaks after returns. - Don't perform any change in IO_CFG_WRITE_MODE if values are invalid. (previously values were set and then set to zero) - Change cast for copy_to_user to (void __user *) - Make file_operations gpio_fops static and const. - Make setget_output static. (However, it's still inline since the CRIS architecture is still not SMP, which makes the function small enough to inline)
2008-02-08CRIS v32: Clean up nandflash.c for ARTPEC-3 and ETRAX FS.Jesper Nilsson
Clean up issues noticed by Andrew Morton: - Use a combined struct for allocating the mtd_info and nand_chip structs instead of using anonymous memory as the example in Documentation/DocBook/mtdnand.tmpl - Use kzalloc instead of using kmalloc/memset(0) - Make crisv32_device_ready static.
2008-02-08CRIS: Move ETRAX_AXISFLASHMAP to common Kconfig file.Jesper Nilsson
2008-02-08CRIS v32: Remove config ifdef around init function for drivers/sync_serial.cJesper Nilsson
The init function should be defined always.
2008-02-08CRIS v32: Remove drivers/gpio.c, now exists as machine specific file.Jesper Nilsson
2008-02-08CRIS v32: Update driver for RTC chip pcf8563.Jesper Nilsson
- Moved all calls to register_chrdev to a function called by module_init. - Added mutex locking. - Added better error handling at start up. - Added BIN_TO_BCD of the month value before it is saved to the RTC. - Corrected the month value returned by pcf8563_readreg. - Cache the voltage low value at driver init so the battery status information does not get 'accidentally' cleared when setting the RTC time. - Removed obsolete CONFIG_ETRAX_RTC_READONLY - Voltage low ioctl():s RTC_VLOW_RD -> RTC_VL_READ, RTC_VLOW_SET -> RTC_VL_CLR
2008-02-08CRIS v32: Remove drivers/nandflash.h, now exists as machine specific file.Jesper Nilsson
2008-02-08CRIS v32: ETRAX FS Change name of LED macros in drivers/mach-fs/gpio.c to ↵Jesper Nilsson
avoid collision.
2008-02-08CRIS v32: Change name of LED macros in drivers/mach-a3/gpio.c to avoid ↵Jesper Nilsson
collision.
2008-02-08CRIS v32: Change include path for hwregs in drivers/iop_fw_load.cJesper Nilsson
Also, remove useless CVS id tag.
2008-02-08CRIS v32: Rewrite of stream co-processor driver for ETRAX FS and ARTPEC-3Jesper Nilsson
- Workaround for cachebug (Guinness TR 106). - Add ARTPEC-3 support.
2008-02-08CRIS: Move common Kconfig variable ETRAX_RTC to arch independet Kconfig.Jesper Nilsson
2008-02-08CRIS v32: Remove common gpio and nandflash, add mach-fs and mach-a3 as subdirs.Jesper Nilsson
Also add board_mmcspi to build if ETRAX_SPI_MMC_BOARD is set. (Generic MMC SPI implementation)
2008-02-08CRIS v32: Update and improve axisflashmapJesper Nilsson
- 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.
2008-02-08CRIS v32: New version of I2C driver.Jesper Nilsson
- 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.
2008-02-08CRIS v32: Update synchronous serial driver.Jesper Nilsson
Now uses a DMA descriptor ring, which should avoid any unnecessary pauses in the streams.
2008-02-08CRIS v32: Add new driver files for Etrax-FSJesper Nilsson
Adds gpio and nandflash handling for Etrax-FS
2008-02-08CRIS v32: Add new driver files for Artpec-3.Jesper Nilsson
Adds gpio and nandflash handling for Artpec-3.
2008-02-08CRIS: Rearrange Kconfigs for v10 and v32 to allow compilation without warnings.Jesper Nilsson
- 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)
2008-02-05arch/cris: add a missing iounmapJulia Lawall
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>
2008-02-05CRIS: avoid using arch links in KconfigJesper Nilsson
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>
2008-01-25Kobject: the cris iop_fw_load.c code is brokenGreg Kroah-Hartman
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>
2007-11-27ide: move CONFIG_IDE_ETRAX to drivers/ide/KconfigBartlomiej Zolnierkiewicz
* 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>
2007-11-15CRIS: remove MTD_AMSTD and MTD_OBSOLETE_CHIPS take twoJesper Nilsson
Remove MTD_AMDSTD and MTD_OBSOLETE_CHIPS from defconfig, Kconfig and code, instead we'll use MTD_CFI or MTD_JEDECPROBE. [akpm@linux-foundation.org: codingl-style cleanups] Signed-off-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@linux-foundation.org>
2007-11-15cris: ARRAY_SIZE() cleanupAlex Unleashed
I'm converting most array size calculations under arch/ to use ARRAY_SIZE(). This is the patch for CRIS. Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org> Cc: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19spelling fixes: arch/cris/Simon Arlott
Spelling fixes in arch/cris/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19Fix misspellings of "system", "controller", "interrupt" and "necessary".Robert P. J. Day
Fix the various misspellings of "system", controller", "interrupt" and "[un]necessary". Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-08-20ide: fix hidden dependencies on CONFIG_IDE_GENERICBartlomiej Zolnierkiewicz
Some host drivers depend on CONFIG_IDE_GENERIC to do the probing but their config options lack explicit dependencies on IDE_GENERIC. In the long-term these host drivers should be fixed to do the probing themselves but for now fix them by making their config options select CONFIG_IDE_GENERIC. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-19some kmalloc/memset ->kzalloc (tree wide)Yoann Padioleau
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc). Here is a short excerpt of the semantic patch performing this transformation: @@ type T2; expression x; identifier f,fld; expression E; expression E1,E2; expression e1,e2,e3,y; statement S; @@ x = - kmalloc + kzalloc (E1,E2) ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\) - memset((T2)x,0,E1); @@ expression E1,E2,E3; @@ - kzalloc(E1 * E2,E3) + kcalloc(E1,E2,E3) [akpm@linux-foundation.org: get kcalloc args the right way around] Signed-off-by: Yoann Padioleau <padator@wanadoo.fr> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Acked-by: Russell King <rmk@arm.linux.org.uk> Cc: Bryan Wu <bryan.wu@analog.com> Acked-by: Jiri Slaby <jirislaby@gmail.com> Cc: Dave Airlie <airlied@linux.ie> Acked-by: Roland Dreier <rolandd@cisco.com> Cc: Jiri Kosina <jkosina@suse.cz> Acked-by: Dmitry Torokhov <dtor@mail.ru> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org> Acked-by: Pierre Ossman <drzeus-list@drzeus.cx> Cc: Jeff Garzik <jeff@garzik.org> Cc: "David S. Miller" <davem@davemloft.net> Acked-by: Greg KH <greg@kroah.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19unregister_chrdev(): ignore the return valueAkinobu Mita
unregister_chrdev() always returns 0. There is no need to check the return value. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16CRIS: replace old-style member inits with designated initsRobert P. J. Day
Replace the old-style structure member initializers with designated initializers. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-09Fix trivial typos in Kconfig* filesDavid Sterba
Fix several typos in help text in Kconfig* files. Signed-off-by: David Sterba <dave@jikos.cz> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-08dma_declare_coherent_memory wrong allocationGuennadi Liakhovetski
dma_declare_coherent_memory() allocates a bitmap 1 bit per page, it calculates the bitmap size based on size of long, but allocates bytes... Thanks to James Bottomley for clarifications and corrections. Signed-off-by: G. Liakhovetski <g.liakhovetski@gmx.de> Acked-by: James Bottomley <James.Bottomley@SteelEye.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-28[PATCH] MSI-X: fix resume crashEric W. Biederman
So I think the right solution is to simply make pci_enable_device just flip enable bits and move the rest of the work someplace else. However a thorough cleanup is a little extreme for this point in the release cycle, so I think a quick hack that makes the code not stomp the irq when msi irq's are enabled should be the first fix. Then we can later make the code not change the irqs at all. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-01[PATCH] fix memory leak in dma_declare_coherent_memory()Yoichi Yuasa
When it goes to free1_out, dev->dma_mem has not been freed. Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-17arch/cris: typo in KERN_INFONicolas Kaiser
Typo in KERN_INFO. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-12[PATCH] mark struct file_operations const 2Arjan van de Ven
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. [akpm@osdl.org: sparc64 fix] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-12-13[PATCH] getting rid of all casts of k[cmz]alloc() callsRobert P. J. Day
Run this: #!/bin/sh for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do echo "De-casting $f..." perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f done And then go through and reinstate those cases where code is casting pointers to non-pointers. And then drop a few hunks which conflicted with outstanding work. Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Dike <jdike@addtoit.com> Cc: Greg KH <greg@kroah.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Paul Fulghum <paulkf@microgate.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Karsten Keil <kkeil@suse.de> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Ian Kent <raven@themaw.net> Cc: Steven French <sfrench@us.ibm.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Neil Brown <neilb@cse.unsw.edu.au> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>