An error occurred fetching the project authors.
- 06 Jun, 2014 1 commit
-
-
Jingoo Han authored
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- 14 Apr, 2014 1 commit
-
-
Axel Lin authored
mpc8xxx_spi_probe() has set master->cleanup = mpc8xxx_spi_cleanup, however current code overrides the setting in fsl_spi_probe() and set master->cleanup = fsl_spi_cleanup. Thus the memory allocated for cs is not freed anywhere. Convert to use devm_kzalloc to fix the memory leak. Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- 03 Apr, 2014 1 commit
-
-
Axel Lin authored
Since commit 1e25cd47 "spi: Do not require a completion", this checking is required to prevent NULL pointer dereference. Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- 23 Feb, 2014 1 commit
-
-
Axel Lin authored
Set bits_per_word_mask so spi core will reject transfers that attempt to use an unsupported bits_per_word value. fsl_spi_grlib_probe() may update mpc8xxx_spi->max_bits_per_word setting. So set master->bits_per_word_mask after fsl_spi_grlib_probe(). Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- 04 Feb, 2014 1 commit
-
-
Stefan Roese authored
When used via spidev with more than one messages to tranfer via SPI_IOC_MESSAGE the current implementation would return with -EINVAL, since bits_per_word and speed_hz are set in all transfer structs. And in the 2nd loop status will stay at -EINVAL as its not overwritten again via fsl_spi_setup_transfer(). This patch changes this behavious by first checking if one of the messages uses different settings. If this is the case the function will return with -EINVAL. If not, the messages are transferred correctly. Signed-off-by:
Stefan Roese <sr@denx.de> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- 15 Nov, 2013 1 commit
-
-
Wolfram Sang authored
Use this new function to make code more comprehensible, since we are reinitialzing the completion, not initializing. [akpm@linux-foundation.org: linux-next resyncs] Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13) Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 29 Aug, 2013 1 commit
-
-
Jingoo Han authored
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- 15 Jul, 2013 1 commit
-
-
Rusty Russell authored
Sweep of the simple cases. Cc: netdev@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Cc: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au> Acked-by:
David S. Miller <davem@davemloft.net> Acked-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 23 May, 2013 1 commit
-
-
Jingoo Han authored
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Mark Brown <broonie@opensource.wolfsonmicro.com>
-
- 07 Apr, 2013 7 commits
-
-
Andreas Larsson authored
This relies upon of_spi_register_master to find out which gpios to use. Acked-by:
Anton Vorontsov <anton@enomsg.org> Signed-off-by:
Andreas Larsson <andreas@gaisler.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
Andreas Larsson authored
This adds support for the mostly register-compatible SPICTRL cores from the GRLIB VHDL IP core library from Aeroflex Gaisler. They are normally running on SPARC. A different entry in of_fsl_spi_match matches this core and indicates a different hardware type that is used to set up different function pointers and special cases. The GRLIB core operates in cpu mode. The number of bits per word might be limited. There might be native chipselects selected via a slave select register. These differences to the FSL type cores, if present, are indicated by a capabilities register. Other register and function differences exists but are not relevant to the driver. Acked-by:
Anton Vorontsov <anton@enomsg.org> Signed-off-by:
Andreas Larsson <andreas@gaisler.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
Andreas Larsson authored
Acked-by:
Anton Vorontsov <anton@enomsg.org> Signed-off-by:
Andreas Larsson <andreas@gaisler.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
Andreas Larsson authored
For being able to distinguishing between the regular type of cores and others with different entries in of_fsl_spi_match. Acked-by:
Anton Vorontsov <anton@enomsg.org> Signed-off-by:
Andreas Larsson <andreas@gaisler.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
Andreas Larsson authored
spi/spi-fsl-spi: Move setting non-zero tx and rx shifts to a function accessed by a function pointer Acked-by:
Anton Vorontsov <anton@enomsg.org> Signed-off-by:
Andreas Larsson <andreas@gaisler.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
Andreas Larsson authored
This is needed for a device in SPI_CS_HIGH mode that otherwise could start out active for the first transaction. Acked-by:
Anton Vorontsov <anton@enomsg.org> Signed-off-by:
Andreas Larsson <andreas@gaisler.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
Andreas Larsson authored
This makes the spi-fsl-spi driver usable in CPU mode outside of an FSL_SOC and even an powerpc environment by moving CPM mode functionality to a separate file that is only compiled and linked in an FSL_SOC environment and adding some ifdefs to hide types and functions or provide alternatives. For devicetree probing a "clock-frequency" property is used for clock frequency instead of calls to FSL_SOC-specific functions. Acked-by:
Anton Vorontsov <anton@enomsg.org> Signed-off-by:
Andreas Larsson <andreas@gaisler.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 01 Apr, 2013 1 commit
-
-
Alexandru Gheorghiu authored
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function. Patch found using coccinelle. Signed-off-by:
Alexandru Gheorghiu <gheorghiuandru@gmail.com> Signed-off-by:
Mark Brown <broonie@opensource.wolfsonmicro.com>
-
- 13 Feb, 2013 1 commit
-
-
Grant Likely authored
This patch replaces the horribly coded of_count_named_gpios() with a call to of_count_phandle_with_args() which is far more efficient. This also changes the return value of of_gpio_count() & of_gpio_named_count() from 'unsigned int' to 'int' so that it can return an error code. All the users of that function are fixed up to correctly handle a negative return value. v2: Split GPIO portion into a separate patch Tested-by:
Andreas Larsson <andreas@gaisler.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com>
-
- 07 Dec, 2012 1 commit
-
-
Grant Likely authored
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Bill Pemberton has done most of the legwork on this series. I've used his script to purge the attributes from the drivers/gpio tree. Reported-by:
Bill Pemberton <wfp5p@virginia.edu> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 20 May, 2012 1 commit
-
-
Herton Ronaldo Krzesinski authored
Commit 178db7d3, "spi: Fix device unregistration when unregistering the bus master", changed spi device initialization of dev.parent pointer to be the master's device pointer instead of his parent. This introduced a bug in spi-fsl-spi, since its usage of spi device pointer was not updated accordingly. This was later fixed by commit 5039a869, "spi/mpc83xx: fix NULL pdata dereference bug", but it missed another spot on fsl_spi_cs_control function where we also need to update usage of spi device pointer. This change address that. Cc: stable@vger.kernel.org Signed-off-by:
Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com> Acked-by:
Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 30 Mar, 2012 1 commit
-
-
Kenth Eriksson authored
Commit 178db7d3, "spi: Fix device unregistration when unregistering the bus master", changed device initialization to be children of the bus master, not children of the bus masters parent device. The pdata pointer used in fsl_spi_chipselect must updated to reflect the changed initialization. Signed-off-by:
Kenth Eriksson <kenth.eriksson@transmode.com> Acked-by:
Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 23 Sep, 2011 1 commit
-
-
Jeff Harris authored
If CPM mode is not used, the fsl_dummy_rx variable is never allocated. When the cleanup attempts to free it, the reference count is zero and a WARN is generated. The same CPM mode check used in the initialize is applied to the free as well. Tested on 2.6.33 with the previous spi_mpc8xxx driver. The renamed spi-fsl-spi driver looks to have the same problem. Signed-off-by:
Jeff Harris <jeff_harris@kentrox.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 05 Jul, 2011 1 commit
-
-
Holger Brunck authored
This patch fixes the freescale spi driver for CPM. Without this patch SPI on CPM failed because cpm_muram_alloc_fixed tries to allocate muram in an preserved area. The error reported was: mpc8xxx_spi f0011a80.spi: can't allocate spi parameter ram mpc8xxx_spi: probe of f0011a80.spi failed with error -12 Now the driver uses of_iomap to get access to this area similar to i2c driver driver in the i2c-cpm.c which has a similar device tree node. This is tested on a MPC8247 with CPM2. Signed-off-by:
Holger Brunck <holger.brunck@keymile.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 06 Jun, 2011 1 commit
-
-
Grant Likely authored
Sort the SPI makefile and enforce the naming convention spi_*.c for spi drivers. This change also rolls the contents of atmel_spi.h into the .c file since there is only one user of that particular include file. v2: - Use 'spi-' prefix instead of 'spi_' to match what seems to be be the predominant pattern for subsystem prefixes. - Clean up filenames in Kconfig and header comment blocks Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Acked-by:
Wolfram Sang <w.sang@pengutronix.de> Acked-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 28 Feb, 2011 1 commit
-
-
Grant Likely authored
Get rid of users of of_platform_driver in drivers/spi. The of_platform_{,un}register_driver functions are going away, so the users need to be converted to using the platform_bus_type directly. Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 13 Oct, 2010 2 commits
-
-
Mingkai Hu authored
Refactor the common code in file spi_fsl_spi.c to spi_fsl_lib.c used by SPI/eSPI controller driver as a library, and leave the QE/CPM SPI controller code in the SPI controller driver spi_fsl_spi.c. Because the register map of the SPI controller and eSPI controller is so different, also leave the code operated the register to the driver code, not the common code. Signed-off-by:
Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
Mingkai Hu authored
This will pave the way to refactor out the common code which can be used by the eSPI controller driver, and rename the SPI controller dirver to the file spi_fsl_spi.c. Signed-off-by:
Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 16 Sep, 2010 1 commit
-
-
christophe leroy authored
It fixes an issue when sending-only or receiving-only more than PAGE_SIZE bytes. Signed-off-by:
christophe leroy <christophe.leroy@c-s.fr> Acked-by:
Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 06 Aug, 2010 1 commit
-
-
Grant Likely authored
of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Reviewed-by:
David S. Miller <davem@davemloft.net>
-
- 30 Jul, 2010 1 commit
-
-
Anatolij Gustschin authored
Move of_register_spi_devices() call from drivers to spi_register_master(). Also change the function to use the struct device_node pointer from master spi device instead of passing it as function argument. Signed-off-by:
Anatolij Gustschin <agust@denx.de> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 11 Jul, 2010 1 commit
-
-
Anton Vorontsov authored
spi_t was removed in commit 644b2a68 ("powerpc/cpm: Remove SPI defines and spi structs"), the commit assumed that spi_t isn't used anywhere outside of the spi_mpc8xxx driver. But it appears that the struct is needed for micropatch code. So, let's reintroduce the struct. Fixes the following build issue: CC arch/powerpc/sysdev/micropatch.o micropatch.c: In function 'cpm_load_patch': micropatch.c:629: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token micropatch.c:629: error: 'spp' undeclared (first use in this function) micropatch.c:629: error: (Each undeclared identifier is reported only once micropatch.c:629: error: for each function it appears in.) Reported-by:
LEROY Christophe <christophe.leroy@c-s.fr> Reported-by:
Tony Breeds <tony@bakeyournoodle.com> Cc: <stable@kernel.org> [ .33, .34 ] Signed-off-by:
Anton Vorontsov <avorontsov@mvista.com> Signed-off-by:
Kumar Gala <galak@kernel.crashing.org>
-
- 25 May, 2010 2 commits
-
-
Joakim Tjernlund authored
This fixes a typo were map_tx_dma is used instead of map_rx_dma, casing the driver to unmap rx_dma when it shouldn't. Signed-off-by:
Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by:
Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
Joakim Tjernlund authored
QE mode uses Little Endian so words > 8 bits are byte swapped. Workaround this by always enforcing wordsize 8 for words > 8 bits. Unfortunately this will not work for LSB transfers where wordsize is > 8 bits so disable these for now. Also move the different quirks into its own function to keep mpc8xxx_spi_setup_transfer() sane. Signed-off-by:
Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by:
Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 22 May, 2010 2 commits
-
-
Joakim Tjernlund authored
tx_dma/rx_dma are already set to a dummy buffer when no tx/rx buffer and t->tx_dma/t->rx_dma does not contain a dma address, but NULL. This may lead to corruption of kernel memory. Fix this by leaving tx_dma/rx_dma alone. Do not INIT_TX_RX while controller is enabled, this is bad according to the MPC8321 manual. Signed-off-by:
Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by:
Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
Grant Likely authored
.name, .match_table and .owner are duplicated in both of_platform_driver and device_driver. This patch is a removes the extra copies from struct of_platform_driver and converts all users to the device_driver members. This patch is a pretty mechanical change. The usage model doesn't change and if any drivers have been missed, or if anything has been fixed up incorrectly, then it will fail with a compile time error, and the fixup will be trivial. This patch looks big and scary because it touches so many files, but it should be pretty safe. Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Acked-by:
Sean MacLennan <smaclennan@pikatech.com>
-
- 18 May, 2010 1 commit
-
-
Grant Likely authored
The following structure elements duplicate the information in 'struct device.of_node' and so are being eliminated. This patch makes all readers of these elements use device.of_node instead. (struct of_device *)->node (struct dev_archdata *)->prom_node (sparc) (struct dev_archdata *)->of_node (powerpc & microblaze) Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 30 Mar, 2010 1 commit
-
-
Tejun Heo authored
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by:
Tejun Heo <tj@kernel.org> Guess-its-ok-by:
Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
-
- 16 Mar, 2010 1 commit
-
-
Thomas Weber authored
[Ss]ytem => [Ss]ystem udpate => update paramters => parameters orginal => original Signed-off-by:
Thomas Weber <swirl@gmx.li> Acked-by:
Randy Dunlap <rdunlap@xenotime.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- 16 Feb, 2010 1 commit
-
-
Ernst Schwab authored
Correct SPI clock frequency division factor rounding, preventing clock rates higher than the maximum specified clock frequency being used. When specifying spi-max-frequency = <10000000> in the device tree, the resulting frequency was 11.1 MHz, with spibrg being 133333332. According to the freescale data sheet [1], the spi clock rate is spiclk = spibrg / (4 * (pm+1)) The existing code calculated pm = mpc8xxx_spi->spibrg / (hz * 4); pm--; resulting in pm = (int) (3.3333) - 1 = 2, resulting in spiclk = 133333332/(4*(2+1)) = 11111111 With the fix, pm = (mpc8xxx_spi->spibrg - 1) / (hz * 4) + 1; pm--; resulting in pm = (int) (4.3333) - 1 = 3, resulting in spiclk = 133333332/(4*(3+1)) = 8333333 Without the fix, for every desired SPI frequency that is not exactly derivable from spibrg, pm will be too small due to rounding down, resulting in a too high SPI clock, so we need a pm which is one higher. For values that are exactly derivable, spibrg will be dividable by (hz*4) without remainder, and (int) ((spibrg-1)/(hz*4)) will be one lower than (int) (spibrg)/(hz*4), which is compensated by adding 1. For these values, the fixed version calculates the same pm as the unfixed version. For all values that are not exactly derivable, spibrg will be not dividable by (hz*4) without remainder, and (int) ((spibrg-1)/(hz*4)) will be the same as (int) (spibrg)/(hz*4), and the calculated pm will be one higher than calculated by the unfixed version. References: [1] http://www.freescale.com/files/32bit/doc/ref_manual/MPC8315ERM.pdf, page 22-10 -> 1398 Signed-off-by:
Ernst Schwab <eschwab@online.de> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 20 Jan, 2010 1 commit
-
-
Uwe Kleine-König authored
platform_get_irq returns -ENXIO on failure, so !irq was probably always true. Make irq a signed variable and compare irq <= 0. Note that a return value of zero is still handled as error even though this could mean irq0. This is a followup to 305b3228 that changed the return value of platform_get_irq from 0 to -ENXIO on error. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by:
Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-