On 12/13/2011 06:56 PM, Peter Maydell wrote:
On 12 December 2011 06:43, Evgeny Voevodin<e.voevo...@samsung.com> wrote:
--- /dev/null
+++ b/hw/exynos4210_sdhc.c
@@ -0,0 +1,1666 @@
+/*
+ * Samsung exynos4210 SD/MMC host controller
+ * (SD host controller specification ver. 2.0 compliant)
Is there anything in this implementation which is exynos specific,
or is it purely an implementation of the standard?
We should separate out (and name appropriately) the code which
is implementing the SD host standard specification, and if necessary
add a thin wrapper for any exynos-specific bits.
-- PMM
Yes, exynos SD host controller has additional features controlled by
exynos-specific bits in several specification-defined registers, and by
registers CONTROL2 and CONTROL3 (which are not defined in SD host
controller specification at all).
Are you suggesting to implement something like layered device, when
device-specific SD host controller state structure includes generic host
controller state? I thought about replacing exynos-specific registers in
sd host controller state with two variables holding pointer to and size
of these exynos-specific (or any other device specific) registers, plus
add extra variable to hold host controller variant. This way it should
be easier to account for influence of device sd host controller specific
bits to default specification-defined registers behaviour.