aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/gpmc-nand.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-05-27ARM: OMAP2+: gpmc: enable BCH_HW ecc-scheme for AM43xx platformsPekon Gupta1-1/+1
Fixes: commit 0611c41934ab35ce84dea34ab291897ad3cbc7be ARM: OMAP2+: gpmc: update gpmc_hwecc_bch_capable() for new platforms and ECC schemes Though the commit log of above commit mentions AM43xx platforms, but code change missed AM43xx. This patch adds AM43xx to list of those SoC which have built-in ELM hardware engine, so that BCH ecc-schemes with hardware error-correction can be enabled on AM43xx devices. Reported-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Pekon Gupta <pekon@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-03-02ARM: OMAP2+: gpmc: update gpmc_hwecc_bch_capable() for new platforms and ECC schemesPekon Gupta1-11/+20
This patch - refactors gpmc_hwecc_bch_capable() - add checks for new platforms like dra7xx, am43xx - add checks for OMAP3 SoC, w.r.t. new ECC schemes spawned in following commit: commit ac65caf514ec3e55e8d3d510ee37f80dd97418fe ARM: OMAP2+: cleaned-up DT support of various ECC schemes Signed-off-by: Pekon Gupta <pekon@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-01-08ARM: OMAP2+: gpmc: Move legacy GPMC width settingEzequiel Garcia1-5/+5
After the introduction of gpmc_set_legacy(), move the GPMC width setting to be done inside it. Currently, in the DT probed case, this is (wrongly) done twice: first at gpmc_read_settings_dt(), and then based in the NAND width setting. Fix this and use only the value obtained from the DT. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-01-08ARM: OMAP2+: gpmc: Introduce gpmc_set_legacy()Ezequiel Garcia1-8/+14
Introduce a helper function to complete the setting of some GPMC parameters, only used when the gpmc is probed from a board file. As such, it will go away once the DT conversion is completed. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-01-08ARM: OMAP2+: gpmc: Move initialization outside the gpmc_t conditionEzequiel Garcia1-20/+20
This commit moves a bunch of initialization previously enclosed under a 'if (gpmc_t)' check, to be outside such condition. These initializations are not related to gpmc_t (timings) in any way so it's nonsense to enclose them under such check. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-05-16ARM: dts: OMAP2+: Simplify NAND supportJon Hunter1-2/+2
Commit 8c8a777 (ARM: OMAP2+: Add function to read GPMC settings from device-tree) added a device-tree property "gpmc,device-nand" to indicate is the GPMC child device is NAND. This commit should have updated the GPMC NAND documentation (Documentation/devicetree/bindings/mtd/gpmc-nand.txt) to list the property "gpmc,device-nand" as a required property and also updated the example. However, this property is redundant and not needed because the GPMC child device node for NAND is called "nand". Therefore, remove this property. Signed-off-by: Jon Hunter <jon-hunter@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-05-16ARM: OMAP2+: nand: reorganize gpmc timing valuesChristoph Fritz1-39/+1
This patch removes omap2_nand_gpmc_retime() which was used to quirk some timing values before gpmc_cs_set_timings(). Due to recent changes, gpmc_cs_set_timings() has evolved so that there is no more need for a retime function. To keep the gpmc configuration consistent for legacy board files, this patch also adds oe_on and we_on to nand_default_timings[] as they would be by the retime function. Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-04-03ARM: OMAP2+: Convert NAND to retrieve GPMC settings from DTJon Hunter1-6/+10
When booting with device-tree, retrieve GPMC settings for NAND from the device-tree blob. This will allow us to remove all static settings stored in the gpmc-nand.c in the future once the migration to device-tree is complete. Signed-off-by: Jon Hunter <jon-hunter@ti.com> Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
2013-04-01ARM: OMAP2+: Don't configure of chip-select options in gpmc_cs_configure()Jon Hunter1-1/+1
With the addition of the gpmc_cs_program_settings(), we no longer need or use gpmc_cs_configure() to configure some of the GPMC chip-select options. So rename the function to gpmc_configure() and remove code that modifies options in the CONFIG1 register. Signed-off-by: Jon Hunter <jon-hunter@ti.com> Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
2013-04-01ARM: OMAP2+: Convert NAND to use gpmc_cs_program_settings()Jon Hunter1-12/+23
Convert the OMAP2+ NAND code to use the gpmc_cs_program_settings() function for configuring the various GPMC options instead of directly programming the CONFIG1 register. This moves the configuration of some GPMC options outside the nand_gpmc_retime() because these options should only need to be set once regardless of whether the gpmc timing is changing dynamically at runtime. The programming of where the wait-pin is also moved slightly, but this will not have any impact to existing devices as no boards are currently setting the dev_ready variable. Signed-off-by: Jon Hunter <jon-hunter@ti.com> Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
2013-04-01ARM: omap2: gpmc-nand: Print something useful on CS request failureEzequiel Garcia1-1/+2
If CS request fails the current error message is rather unhelpful. Fix it by printing the failing chip select and the error code. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Reviewed-by: Jon Hunter <jon-hunter@ti.com> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
2013-01-15ARM: OMAP: gpmc: enable hwecc for AM33xx SoCsDaniel Mack1-4/+5
The am33xx is capable of handling bch error correction modes, so enable that feature in the driver. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-01-15ARM: OMAP: gpmc-nand: drop __init annotationDaniel Mack1-3/+3
gpmc_nand_init() will be called from another driver's probe() function, so the easiest way to prevent section mismatches is to drop the annotation here. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-11-09ARM: OMAP2+: nand: remove redundant roundingAfzal Mohammed1-13/+13
gpmc_cs_set_timings() calculate ticks to be programmed by rounding time in ns to next tick value. Hence remove redundant rounding of nanosecond timing. Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15ARM: OMAP2+: gpmc: localize gpmc headerAfzal Mohammed1-2/+1
Requirement of gpmc header outside of mach-omap2 has been cutoff, move gpmc header file in plat-omap folder to local mach-omap2 folder Objective - common zImage participation of omap Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15ARM: OMAP2+: nand: bch capability checkAfzal Mohammed1-0/+24
Capability of bch schemes could be discovered using soc revision checks. If soc revision indicates that selected ecc scheme is not supported bail out. Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15ARM: OMAP2+: nand: header cleanupAfzal Mohammed1-28/+30
For common arm zImage existing nand header file in platform specific location was moved to generic platform data location, but it contained more than platform data, remove it. New local header has been created for exposing functions. Also move gpmc-nand platform data to platform header meant for nand from gpmc header file Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-09-19ARM: omap: move platform_data definitionsArnd Bergmann1-1/+1
Platform data for device drivers should be defined in include/linux/platform_data/*.h, not in the architecture and platform specific directories. This moves such data out of the omap include directories Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Nicolas Pitre <nico@linaro.org> Acked-by: Tony Lindgren <tony@atomide.com> Cc: Kevin Hilman <khilman@ti.com> Cc: "BenoƮt Cousson" <b-cousson@ti.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Ohad Ben-Cohen <ohad@wizery.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Omar Ramirez Luna <omar.ramirez@ti.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Cc: Jarkko Nikula <jarkko.nikula@bitmer.com> Cc: Liam Girdwood <lrg@ti.com> Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Cc: Jean Pihet <j-pihet@ti.com> Cc: J Keerthy <j-keerthy@ti.com> Cc: linux-omap@vger.kernel.org
2012-09-12ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+Tony Lindgren1-1/+2
As the plat and mach includes need to disappear for single zImage work, we need to remove plat/hardware.h. Do this by splitting plat/hardware.h into omap1 and omap2+ specific files. The old plat/hardware.h already has omap1 only defines, so it gets moved to mach/hardware.h for omap1. For omap2+, we use the local soc.h that for now just includes the related SoC headers to keep this patch more readable. Note that the local soc.h still includes plat/cpu.h that can be dealt with in later patches. Let's also include plat/serial.h from common.h for all the board-*.c files. This allows making the include files local later on without patching these files again. Note that only minimal changes are done in this patch for the drivers/watchdog/omap_wdt.c driver to keep things compiling. Further patches are needed to eventually remove cpu_is_omap usage in the drivers. Also only minimal changes are done to sound/soc/omap/* to remove the unneeded includes and to define OMAP44XX_MCPDM_L3_BASE locally so there's no need to include omap44xx.h. While at it, also sort some of the includes in the standard way. Cc: linux-watchdog@vger.kernel.org Cc: alsa-devel@alsa-project.org Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Cc: Jarkko Nikula <jarkko.nikula@bitmer.com> Cc: Liam Girdwood <lrg@ti.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-12Merge tags 'omap-devel-gpmc-fixed-for-v3.7' and 'cleanup-omap-tags-for-v3.7' into cleanup-sparseirqTony Lindgren1-6/+23
Changes for GPMC (General Purpose Memory Controller) that take it closer for being just a regular device driver. Remove the ancient omap specific atags that are no longer needed. At some point we were planning to pass the bootloader information with custom atags that did not work out too well. There's no need for these any longer as the kernel has been booting fine without them for quite some time. And Now we have device tree support that can be used instead.
2012-09-10ARM: OMAP: remove plat/board.h fileIgor Grinberg1-1/+0
plat/board.h file is now empty - remove it. Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com> Cc: Chris Ball <cjb@laptop.org> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: linux-mmc@vger.kernel.org Cc: linux-mtd@lists.infradead.org Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Chris Ball <cjb@laptop.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-30ARM: OMAP2+: gpmc-nand: Modify Interrupt handlingAfzal Mohammed1-6/+20
Now GPMC provides its client with interrupts that can be handled using the standard interrupt API. Modify GPMC NAND setup to work with it. Also disable write protect in GPMC code, so that NAND driver can be ignorant of GPMC configuration. Signed-off-by: Afzal Mohammed <afzal@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-30ARM: OMAP2+: gpmc-nand: update resource with memoryAfzal Mohammed1-1/+3
Currently omap nand driver uses a field in platform data - phys_base for passing the address space allocated by gpmc for nand. Use struct resource instead. With this change omap nand driver has to get address space from memory resource. This helps in smooth migration of gpmc to driver. Signed-off-by: Afzal Mohammed <afzal@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-30ARM: OMAP2+: gpmc-nand: update gpmc-nand regsAfzal Mohammed1-0/+2
GPMC has NAND registers, update nand platform data with those details so that NAND driver can configure those by itself instead of using exported symbols. Signed-off-by: Afzal Mohammed <afzal@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-02-24ARM: OMAP: Remove plat/io.h by splitting it into mach/io.h and mach/hardware.hTony Lindgren1-0/+1
This is needed to minimize io.h so the SoC specific io.h for ARMs can removed. Note that minimal driver changes for DSS and RNG are needed to include cpu.h for SoC detection macros. Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Matt Mackall <mpm@selenic.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-06-29omap: cleanup NAND platform dataGrazvydas Ignotas1-7/+3
omap_nand_platform_data fields 'options', 'gpio_irq', 'nand_setup' and 'dma_channel' are never referenced by the NAND driver, yet various board files are initializing those fields. This is both incorrect and confusing, so remove them. This allows to get rid of a global variable in gpmc-nand.c. This also corrects an issue where some boards are trying to pass NAND 16bit flag through .options, but the driver is using .devsize instead and ignoring .options. Finally, .dev_ready is treated as a flag by the driver, so make it bool instead of a function pointer. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-02-17omap3630: nand: fix device size to work in polled modeSukumar Ghorai1-2/+5
zoom3 and 3630-sdp having the x16 nand device. This patch configure gpmc as x16 and select the currect function in driver for polled mode (without prefetch enable) transfer. Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-12-21OMAP2/3: GPMC: put sync_clk value in picoseconds instead of nanosecondsAdrian Hunter1-1/+1
The calculations done with sync_clk are anyway in picoseconds and switching to picoseconds allows sync_clk values that are not a whole number of nanoseconds - which is sometimes the case. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-08-02omap3 nand: cleanup virtual address usagesSukumar Ghorai1-28/+9
This patch removes direct reference of gpmc address from generic nand platform code. Nand platform code now uses wrapper functions which are implemented in gpmc module. Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23omap: fix a gpmc nand problemstanley.miao1-0/+3
If gpmc_t isn't given, we don't need to set timing for gpmc, or it will cause a Oops. Signed-off-by: Stanley.Miao <stanley.miao@windriver.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15omap2/3/4: Introducing 'gpmc-nand.c' for GPMC specific NAND initVimal Singh1-0/+139
Introducing 'gpmc-nand.c' for GPMC specific NAND init. For example: GPMC timing parameters and all. This patch also migrates gpmc related calls from 'nand/omap2.c' to 'gpmc-nand.c'. Signed-off-by: Vimal Singh <vimalsingh@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>