• James Clark's avatar
    coresight: Move mode to struct coresight_device · 9cae77cf
    James Clark authored
    Most devices use mode, so move the mode definition out of the individual
    devices and up to the Coresight device. This will allow the core code to
    also know the mode which will be useful in a later commit.
    
    This also fixes the inconsistency of the documentation of the mode field
    on the individual device types. For example ETB10 had "this ETB is being
    used".
    
    Two devices didn't require an atomic mode type, so these usages have
    been converted to atomic_get() and atomic_set() only to make it compile,
    but the documentation of the field in struct coresight_device explains
    this type of usage.
    
    In the future, manipulation of the mode could be completely moved out of
    the individual devices and into the core code because it's almost all
    duplicate code, and this change is a step towards that.
    Signed-off-by: default avatarJames Clark <james.clark@arm.com>
    Link: https://lore.kernel.org/r/20240129154050.569566-5-james.clark@arm.comSigned-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
    9cae77cf
coresight-etm4x.h 35.5 KB