public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 2/7] memory: atmel-ebi: Simplify SMC config code
@ 2017-08-30 12:53 ian.eperson at dedf.co.uk
  2017-08-31  6:27 ` Alexander Dahl
  0 siblings, 1 reply; 6+ messages in thread
From: ian.eperson at dedf.co.uk @ 2017-08-30 12:53 UTC (permalink / raw)
  To: linux-arm-kernel

This patch appears to result in the following code at the end of 
atmel_ebi_xslate_smc_config() ? lines 265++:

	ret = atmel_ebi_xslate_smc_timings(ebid, np, &conf->smcconf);
	if (ret)
		return -EINVAL;

	if ((ret > 0 && !required) || (!ret && required)) {
		dev_err(ebid->ebi->dev, "missing atmel,smc- properties in %s",
			np->full_name);
		return -EINVAL;
	}

	return required;

My understanding is that atmel_ebi_xslate_smc_timings() returns true 
(>0), false (0) or error (<0) so the first test here should be:

	if(ret<0)

Otherwise the logic in the second test can be reduced to:

	if(required)

and some further changes to atmel_ebi_xslate_smc_timings() are needed


Regards



Ian Eperson
DeDf Co Ltd

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH 0/7] memory: atmel-ebi: Add PM ops
@ 2017-03-16  8:30 Boris Brezillon
  2017-03-16  8:30 ` [PATCH v2 2/7] memory: atmel-ebi: Simplify SMC config code Boris Brezillon
  0 siblings, 1 reply; 6+ messages in thread
From: Boris Brezillon @ 2017-03-16  8:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

This patchset adds a ->resume() hook to the EBI driver, but a few more
changes were required in order to easily implement this PM hook.

Patches 1 to 5 are just cleanup patches to simplify the EBI driver.
Patch 6 is fixing a bug in the EBI driver. Note that this bug has no
consequences until we start implementing the ->resume() hook.
And finally, patch 7 is implementing ->resume() so that the SMC config
is correctly restored when resuming the system.

This patchset depends on [1] which is removing the unused pata_at91
driver, which in turn prevents us from patching it before dropping
the old SMC macro definitions in patch 4.

Regards,

Boris

[1]http://lkml.iu.edu/hypermail/linux/kernel/1702.2/00990.html

Changes since v1:
- move helper functions in a C file
- check if tdf is at least ATMEL_SMC_MODE_TDF_MIN

Boris Brezillon (7):
  mfd: syscon: atmel-smc: Add new helpers to ease SMC regs manipulation
  memory: atmel-ebi: Simplify SMC config code
  memory: atmel-ebi: Stop using reg_field objects for simple things
  mfd: syscon: atmel-smc: Remove unused helpers/macros
  memory: atmel-ebi: Change naming scheme
  memory: atmel-ebi: Add missing ->numcs assignment
  memory: atmel-ebi: Add PM ops

 drivers/memory/Kconfig               |   1 +
 drivers/memory/atmel-ebi.c           | 584 ++++++++++++-----------------------
 drivers/mfd/Kconfig                  |   4 +
 drivers/mfd/Makefile                 |   1 +
 drivers/mfd/atmel-smc.c              | 314 +++++++++++++++++++
 include/linux/mfd/syscon/atmel-smc.h | 237 ++++++--------
 6 files changed, 606 insertions(+), 535 deletions(-)
 create mode 100644 drivers/mfd/atmel-smc.c

-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-01  8:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-30 12:53 [PATCH v2 2/7] memory: atmel-ebi: Simplify SMC config code ian.eperson at dedf.co.uk
2017-08-31  6:27 ` Alexander Dahl
2017-08-31  9:39   ` ian.eperson at dedf.co.uk
2017-08-31 12:52     ` Alexander Dahl
2017-09-01  8:10     ` ian.eperson at dedf.co.uk
  -- strict thread matches above, loose matches on Subject: below --
2017-03-16  8:30 [PATCH 0/7] memory: atmel-ebi: Add PM ops Boris Brezillon
2017-03-16  8:30 ` [PATCH v2 2/7] memory: atmel-ebi: Simplify SMC config code Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox