net: dsa: felix: use DEFINE_RES_MEM_NAMED for resources
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 27 Sep 2022 19:15:19 +0000 (22:15 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 29 Sep 2022 02:14:56 +0000 (19:14 -0700)
commit044d447a801f2d0c03e153ef41835aebf66ca2d6
tree1ae5817a8607031bee550bf6ccd6628d08bb91e9
parent8f66c64bfca33fd863e2bf0f53d7774d0c9c6aba
net: dsa: felix: use DEFINE_RES_MEM_NAMED for resources

Use less verbose resource definitions in vsc9959 and vsc9953. This also
sets IORESOURCE_MEM in the constant array of resources, so we don't have
to do this from felix_init_structs() - in fact, in the future, we may
even support IORESOURCE_REG resources.

Note that this macro takes start and length as argument, and we had
start and end before. So transform end into length.

While at it, sort the resources according to their offset.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/ocelot/felix.c
drivers/net/dsa/ocelot/felix_vsc9959.c
drivers/net/dsa/ocelot/seville_vsc9953.c