]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: OMAP2+: Allow GPMC probe to complete even if CS mapping fails
authorJon Hunter <jon-hunter@ti.com>
Wed, 6 Mar 2013 20:36:47 +0000 (14:36 -0600)
committerJon Hunter <jon-hunter@ti.com>
Thu, 4 Apr 2013 01:13:40 +0000 (20:13 -0500)
commit27a76792bc39226b39d0b5f4f7478a90f1d9117d
tree7c9385c69709721d2601cc5b5d468ca415b2334d
parentdcf384d0543a3c25a8d68a26778c8289b06a152e
ARM: OMAP2+: Allow GPMC probe to complete even if CS mapping fails

When the GPMC driver is probed, we call gpmc_mem_init() to see which
chip-selects have already been configured and enabled by the boot-loader
and allocate space for them. If we fail to allocate space for one
chip-select, then we return failure from the probe and the GPMC driver
will not be available.

Rather than render the GPMC useless for all GPMC devices, if we fail to
allocate space for one chip-select print a warning and disable the
chip-select. This way other GPMC clients can still be used.

There is no downside to this approach, because all GPMC clients need to
request a chip-select before they can use the GPMC and on requesting a
chip-select, if memory has not already been reserved for the chip-select
then it will be.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
arch/arm/mach-omap2/gpmc.c