Martin Kaiser
aefb1fc5c1
staging: r8188eu: odm BoardType is never set
...
odm BoardType is never set, so it's always 0 (ODM_BOARD_NORMAL).
Remove dead code and the BoardType itself.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211011201159.10252-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:27:14 +02:00
Martin Kaiser
e5c90c693d
staging: r8188eu: remove odm_SwAntDivInit
...
This function is empty, it can be removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211011201159.10252-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:27:14 +02:00
Martin Kaiser
2ec2b21038
staging: r8188eu: SupportICType is always ODM_RTL8188E
...
SupportICType in struct odm_dm_struct is always ODM_RTL8188E. Remove the
component and code that is executed only for other types.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211011201159.10252-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:27:14 +02:00
Martin Kaiser
4b64b5ef2b
staging: r8188eu: remove LastMinUndecoratedPWDBForDM
...
LastMinUndecoratedPWDBForDM in struct dm_priv is not used. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211011201159.10252-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:27:14 +02:00
Martin Kaiser
64629b735c
staging: r8188eu: remove rtl8188e_deinit_dm_priv
...
This function is empty and can be removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211011201159.10252-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:27:14 +02:00
Martin Kaiser
97045088d8
staging: r8188eu: simplify rtl8188e_HalDmWatchDog
...
Now that we don't call dm_CheckStatistics any more, we don't need
fw_cur_in_ps and fw_ps_awake.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211011201159.10252-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:27:14 +02:00
Martin Kaiser
bb88fab13d
staging: r8188eu: remove dm_CheckStatistics
...
The dm_CheckStatistics function is empty. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211011201159.10252-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:27:14 +02:00
Martin Kaiser
997e127a28
staging: r8188eu: remove odm ext lna info
...
The ext lna info is never set. Remove it and fix up the one place
where it's read.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211010175204.24029-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:26:51 +02:00
Martin Kaiser
28ad741b21
staging: r8188eu: remove odm ext pa info
...
The ext pa info is not used. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211010175204.24029-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:26:51 +02:00
Martin Kaiser
0e170624f6
staging: r8188eu: remove odm ext trsw info
...
The ext trsw info is not used. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211010175204.24029-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:26:51 +02:00
Martin Kaiser
8f78bc11b8
staging: r8188eu: remove odm hct test info
...
The "in hct test" variable is never set, it's always 0.
Remove the variable and fix up the one place where it was used.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211010175204.24029-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:26:51 +02:00
Martin Kaiser
640649a15e
staging: r8188eu: remove odm wifi test info
...
The wifi test info is set but not used. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211010175204.24029-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:26:50 +02:00
Martin Kaiser
bc7fc9d773
staging: r8188eu: remove odm dualmac smart concurrent info
...
The dualmac smart concurrent info is set but not used. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211010175204.24029-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:26:50 +02:00
Martin Kaiser
cc729e367e
staging: r8188eu: remove odm cut version info
...
The cut version info is set but not used. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211010175204.24029-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:26:50 +02:00
Martin Kaiser
72f069aafa
staging: r8188eu: remove odm fab version info
...
The fab version info is set but not used. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211010175204.24029-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:26:50 +02:00
Martin Kaiser
9cc313e714
staging: r8188eu: RfOnOffDetect is unused
...
Remove the RfOnOffDetect function, which is not used.
Suggested-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211010175204.24029-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:26:50 +02:00
Martin Kaiser
2397591c29
staging: r8188eu: remove specific device table
...
This driver implements a mechanism to set additional configuration flags
per supported usb device.
None of the supported devices uses these additional flags. Remove the data
types and the code to process the flags.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211010175204.24029-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:26:50 +02:00
Martin Kaiser
84799c41c6
staging: r8188eu: remove an unused define
...
_HCI_INTF_C_ is not used and can be removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211010175204.24029-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:26:50 +02:00
Tommaso Merciai
e9c1caea96
staging: vt6655: fix camelcase in byLocalID
...
Replace camel case variable name for variable byLocalID
with snake case equivalent.
Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com >
Link: https://lore.kernel.org/r/20211010220014.148785-1-tomm.merciai@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-13 14:25:52 +02:00
Saurav Girepunje
98f668b30e
staging: rtl8723bs: hal: remove duplicate check
...
Remove 'bPerformance' from if condition check. As on previous
if condition it is already check for same variable.
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com >
Link: https://lore.kernel.org/r/YWKRfYpTioAmTWa0@user
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 15:00:05 +02:00
Michael Straube
a1f42cba65
staging: r8188eu: remove enum _RTL8712_RF_MIMO_CONFIG_
...
The enum _RTL8712_RF_MIMO_CONFIG_ is not used, remove it.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20211009104419.8811-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:57:38 +02:00
Michael Straube
c38a05353f
staging: r8188eu: replace MACADDRLEN with ETH_ALEN
...
Replace the custom constant MACADDRLEN with in-kernel ETH_ALEN.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20211009104419.8811-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:57:38 +02:00
Michael Straube
4b2540a587
staging: r8188eu: remove unused macros and defines from rtl8188e_hal.h
...
Remove unused macros and defines from rtl8188e_hal.h.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20211009104419.8811-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:57:38 +02:00
Michael Straube
005eae3541
staging: r8188eu: remove some dead code
...
In this driver SupportICType is ODM_RTL8188E and SupportInterface is
ODM_ITRF_USB. Remove an if statement that is never true and remove
function odm_DIGbyRSSI_LPS() which is used only in this dead if block.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20211008172621.8721-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:57:22 +02:00
Michael Straube
25c1c7c25a
staging: r8188eu: remove unused defines from rtw_sreset.h
...
Remove unused defines from rtw_sreset.h.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20211008100209.28801-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:57:19 +02:00
Michael Straube
17402cb6ea
staging: r8188eu: rename rtl8188eu_set_hal_ops()
...
After the removal of struct hal_ops function rtl8188eu_set_hal_ops()
only allocates memory for adapt->HalData. Rename the function to
rtl8188eu_alloc_haldata() to reflect what it actually does.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20211007103943.8433-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:56:42 +02:00
Michael Straube
5c78a7583c
staging: r8188eu: remove hal_ops
...
Remove the last pointer hal_deinit from struct hal_ops and call
rtl8188eu_hal_deinit() directly. Remove the now empty struct
hal_ops.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20211007103943.8433-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:56:42 +02:00
Michael Straube
b66d42066f
staging: r8188eu: remove hal_init from hal_ops
...
Remove hal_init from struct hal_ops and call rtl8188eu_hal_init()
directly.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20211007103943.8433-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:56:42 +02:00
Michael Straube
9c44c0f6da
staging: r8188eu: remove GetHwRegHandler from hal_ops
...
Remove GetHwRegHandler from struct hal_ops and remove the wrapper
rtw_hal_get_hwreg(). Call GetHwReg8188EU() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20211007103943.8433-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:56:42 +02:00
Michael Straube
461c477685
staging: r8188eu: remove SetHwRegHandler from hal_ops
...
Remove SetHwRegHandler from struct hal_ops and remove the wrapper
rtw_hal_set_hwreg(). Call SetHwReg8188EU() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20211007103943.8433-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:56:42 +02:00
Martin Kaiser
7198847ad5
staging: r8188eu: merge two signal scale mapping functions
...
Keep the odm_SignalScaleMapping function and remove
odm_SignalScaleMapping_92CSeries.
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211006090949.1694-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:55:49 +02:00
Martin Kaiser
23b18275c6
staging: r8188eu: Odm PatchID is always 0
...
PatchID is a copy of the hal customer id that is always 0.
Remove PatchID from struct odm_dm_struct and the code that is
executed only for PatchID != 0.
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211006090949.1694-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:55:49 +02:00
Martin Kaiser
ca444fb2e5
staging: r8188eu: hal data's customer id is always 0
...
CustomerID in struct hal_data_8188e is never set, it remains at the
default value 0.
Remove CustomerID and fix the two places where it was used.
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211006090949.1694-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:55:49 +02:00
Martin Kaiser
33a47b9d84
staging: r8188eu: support interface is always usb
...
We set ODM_CMNINFO_INTERFACE to ODM_ITRF_USB as this driver supports
only usb. Therefore, dm_odm->SupportInterface is always ODM_ITRF_USB.
Simplify some if conditions accordingly. Remove/replace two empty
functions.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211005200821.19783-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:55:28 +02:00
Martin Kaiser
d01c3a1d21
staging: r8188eu: interface type is always usb
...
This driver only supports chips that connect via usb. Remove
interface_type from struct adapter, use a constant in the one
place where the interface type is needed.
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211005200821.19783-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:55:28 +02:00
Martin Kaiser
8504b988c0
staging: r8188eu: chip_type is write-only
...
chip_type in struct adapter is never read. Remove the component
and the code to initialise it.
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211005200821.19783-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:55:28 +02:00
Martin Kaiser
d3e45102f9
staging: r8188eu: HardwareType is write-only
...
HardwareType in struct adapter is never read, it can be removed.
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211005200821.19783-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:55:28 +02:00
Martin Kaiser
fdfd6fabb5
staging: r8188eu: remove two write-only hal components
...
RegTxPause and RegBcnCtrlVal from struct hal_data_8188e are set but never
read. Remove them.
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211005200821.19783-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:55:28 +02:00
Martin Kaiser
4864ad2200
staging: r8188eu: remove unused IntrMask
...
The IntrMask array is set but never read. Remove it.
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211005200821.19783-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:55:28 +02:00
Martin Kaiser
082690bd8b
staging: r8188eu: remove write-only HwRxPageSize
...
HwRxPageSize from struct hal_data_8188e is set but never read. Remove
the component and the code to initialise it.
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211005200821.19783-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:55:28 +02:00
Martin Kaiser
2f4f870909
staging: r8188eu: remove unused led component
...
bSWLedCtrl in struct LED_871x is not used. Remove it.
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211005200821.19783-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:55:28 +02:00
Martin Kaiser
fa6fc23694
staging: r8188eu: remove an obsolete comment
...
The function that this comment describes is not present in the
r8188eu driver. The comment can be removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20211005200821.19783-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:55:27 +02:00
Tommaso Merciai
1977dcf07b
staging: vt6655: fix camelcase in PortOffset
...
Replace camel case variable PortOffset with snake case
variable port_offset.
Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com >
Link: https://lore.kernel.org/r/20211005205702.14029-4-tomm.merciai@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:52:07 +02:00
Tommaso Merciai
aeec304c2e
staging: vt6655: fix camelcase in ldBmThreshold
...
Replace camel case variable ldBmThreshold with snake case
variable dbm_threshold. ldBmThreshold is in hungarian notation, where
"l" is for long and "dbm" is for decibel-milliwatt (signal strenght).
This variable contain's signal strenght threshold in dbm.
References:
- https://en.wikipedia.org/wiki/Hungarian_notation
- https://www.rapidtables.com/electric/dBm.html
Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com >
Link: https://lore.kernel.org/r/20211005205702.14029-3-tomm.merciai@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:52:07 +02:00
Tommaso Merciai
e4a9e1d8f2
staging: vt6655: fix camelcase in bShortSlotTime
...
Replace camel case variable bShortSlotTime with snake case variable
short_slot_time. bShortSlotTime is a boolean variable, if true short
slot time is enabled, false not. Short Slot Time reduces the slot time
from 20 microseconds to 9 microseconds, where the slot time is
the maximum theoretical time for a frame to travel a network.
References:
- http://cciew.blogspot.com/2011/02/short-slot-time.html
- https://www.cse.wustl.edu/~jain/cse574-16/ftp/j_05lan4.pdf
- https://www.networkdatapedia.com/post/2013/09/16/ \
configuring-short-slot-time-to-improve-wifi-performance
- https://en.wikipedia.org/wiki/Slot_time
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com >
Link: https://lore.kernel.org/r/20211005205702.14029-2-tomm.merciai@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-10 14:52:07 +02:00
Sergio Paracuellos
e538e86498
MIPS: asm: pci: define arch-specific 'pci_remap_iospace()' dependent on 'CONFIG_PCI_DRIVERS_GENERIC'
...
Some MIPS defconfigs that don't define 'CONFIG_PCI_DRIVERS_GENERIC' but
define 'CONFIG_PCI_DRIVERS_LEGACY' or none of them, can fail when they are
built since definition for 'pci_remap_iospace' is being done in include
file 'arch/mips/include/asm/pci.h' and the specific function implemented
in 'arch/mips/pci/pci-generic.c'. MIPS PCI drivers that don't use generic
PCI core APIs don't really need 'pci_remap_iospace' to be defined at all.
Hence, change definition for 'pci_remap_iospace' to be dependent on the
preprocessor 'CONFIG_PCI_DRIVERS_GENERIC' definition to avoid possible
build problems.
Fixes: 9f76779f24 ("MIPS: implement architecture-specific 'pci_remap_iospace()'")
CC: Thomas Bogendoerfer <tsbogend@alpha.franken.de >
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au >
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com >
Link: https://lore.kernel.org/r/20211008095311.26475-1-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-09 10:37:21 +02:00
Sergio Paracuellos
ecd667f5f2
staging: mt7621-dts: properly define 'cpc' and 'mc' nodes
...
'cpc' and 'mc' nodes correspond with the MIPS 'Cluster Power Controller'
and 'MIPS Common Device Memory Map' which are present in some MIPS related
boards. There is already bindings documentation for these two located in:
- Documentation/devicetree/bindings/power/mti,mips-cpc.yaml
- Documentation/devicetree/bindings/bus/mti,mips-cdmm.yaml
Hence, properly update compatible strings and align nodes with already
mainlined bindings documentation. Also, move their definition to a proper
place since both of them are not related with the palmbus at all.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com >
Link: https://lore.kernel.org/r/20211002060706.30511-1-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-05 12:36:45 +02:00
Sergio Paracuellos
e0b913816b
staging: mt7621-pci: properly adjust base address for the IO window
...
The value to adjust in the bridge register RALINK_PCI_IOBASE must take into
account the raw value from DT, not only the translated linux port number.
As long as io_offset is zero, the two are the same, but if you were to use
multiple host bridge in the system, or pick a different bus address in DT,
you can have a nonzero io_offset. At this means to take into account the
bus address which is used to calculate this offset, substracting it from
the IO resource start address.
Acked-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com >
Link: https://lore.kernel.org/r/20210925203224.10419-7-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-05 12:36:25 +02:00
Sergio Paracuellos
9f76779f24
MIPS: implement architecture-specific 'pci_remap_iospace()'
...
To make PCI IO work we need to properly virtually map IO cpu physical address
and set this virtual address as the address of the first PCI IO port which
is set using function 'set_io_port_base()'.
Acked-by: Arnd Bergmann <arnd@arndb.de >
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de >
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com >
Link: https://lore.kernel.org/r/20210925203224.10419-6-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-05 12:36:25 +02:00
Sergio Paracuellos
7c2584faa1
PCI: Allow architecture-specific pci_remap_iospace()
...
pci_remap_iospace() was originally meant as an architecture specific helper
but it moved into generic code after all architectures had the same
requirements. MIPS has different requirements so it should not be shared.
The way for doing this will be using a macro 'pci_remap_iospace' defined
for those architectures that need a special treatment. Hence, put core API
function inside preprocesor conditional code for 'pci_remap_iospace'
definition.
Acked-by: Bjorn Helgaas <bhelgaas@google.com >
Acked-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com >
Link: https://lore.kernel.org/r/20210925203224.10419-5-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-10-05 12:36:25 +02:00