summaryrefslogtreecommitdiff
path: root/include/linux/mfd/axp20x.h
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2020-02-29 16:31:10 +0200
committerDavid S. Miller <davem@davemloft.net>2020-03-03 18:57:42 -0800
commite0632940bc4c986f2dc9c8ee6aba65c14e30c762 (patch)
treea39b7c31a4458f9fa13427a0f2470520eac240dd /include/linux/mfd/axp20x.h
parented13233d8fe2a478e34b500466d9be1464e3622d (diff)
net: mscc: ocelot: don't rely on preprocessor for vcap key/action packing
The IGR_PORT_MASK key width is different between the 11-port VSC7514 and the 6-port VSC9959 switches. And since IGR_PORT_MASK is one of the first fields of a VCAP key entry, it means that all further field offset/length pairs are shifted between the 2. The ocelot driver performs packing of VCAP half keys with the help of some preprocessor macros: - A set of macros for defining the HKO (Half Key Offset) and HKL (Half Key Length) of each possible key field. The offset of each field is defined as the sum between the offset and the sum of the previous field. - A set of accessors on top of vcap_key_set for shorter (aka less typing) access to the HKO and HKL of each key field. Since the field offsets and lengths are different between switches, defining them through the preprocessor isn't going to fly. So introduce a structure holding (offset, length) pairs and instantiate it in ocelot_board.c for VSC7514. In a future patch, a similar structure will be instantiated in felix_vsc9959.c for NXP LS1028A. The accessors also need to go. They are based on macro name concatenation, which is horrible to understand and follow. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mfd/axp20x.h')
0 files changed, 0 insertions, 0 deletions