Instead of custom macros use pcie_read and pcie_write functions.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 67 -
1 file changed, 32 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b
Use pcie_[read|write] fucntions to read and write controller registers.
Define those only by offset and pass controller offset + register offset
relative to base address to functions.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 70
RALINK_PCI_BASE has no sense and this driver has base address readed
and mapped from device tree. Remove remaining uses of it and
change code to use pcie_read and pcie_write functions in places
where this was being used.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci
is not using PCI_LEGACY code anymore and shall use the
PCI_DRIVERS_GENERIC option to correct compile it. Add also new
Kconfig file for this controller setting there its correct dependencies.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/Kconfig | 2 +
drivers/staging
Driver is using now pci subsystem generics reads and writes and requesting
bus resources without using legacy code functions. Because of this there is
a lot of dead code that can be removed.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 128
pcibios_* remaining code is not neccessary at all. We can use
map_irq set to of_irq_parse_and_map_pci driver 'probe' function.
Remove this code.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 33 +
1 file changed, 1 insertion
The pcie node of the device tree only contains registers
for the host-bridge and pcie port 0. Add the pcie port 1
and pcie port 2 also.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-dts/mt7621.dtsi | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers
RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR are defined to be directly
referenced for read and write. Use pcie_read and pcie_write instead changing
its definition to a simple relative offset to pcie base address.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621
RALINK_PCI_CONFIG_DATA_VIRTUAL_REG is a very long name. Make it a bit
shorter renaming it to RALINK_PCI_CONFIG_DATA.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/mt7621
There some macros that are not being used. Remove them.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 24 +---
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers/staging/mt7621
There are some includes that are being used that are not really
needed to correct driver compilation. Remove them and reorder the
rest alphabetically.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 22 --
1 file changed, 8 insertions(+), 14
write_config function is always called with bus and func
being 0. Avoid those params and just use 0 inside the
function. Review parameter types changing for more proper
ones.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 +---
1 file changed
read_config function is always called with bus and func
being 0. Avoid those params and just use 0 inside the
function. Return readed value instead pass a reference
parameter.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 32 +++-
1
our
of pci_generic_config_[read|write] and change map_bus implemen-
tation for hopefully the right one.
Best regards,
Sergio Paracuellos
Sergio Paracuellos (15):
staging: mt7621-pci: use generic kernel pci subsystem read and write
staging: mt7621-pci: remove dead code derived to not use cus
Some preprocessor definitions are using a custom implementation of
BIT macro. Just use linux kernel BIT macro instead.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers
Introdice this functions to make easier to write/read to/from
an offset relative to base address
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers
Use pcie_[read|write] fucntions to read and write controller registers.
Define those only by offset and pass controller offset + register offset
relative to base address to functions.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 70
There are some includes that are being used that are not really
needed to correct driver compilation. Remove them and reorder the
rest alphabetically.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 22 --
1 file changed, 8 insertions(+), 14
Instead of custom macros use pcie_read and pcie_write functions.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 67 -
1 file changed, 32 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b
write_config function is always called with bus and func
being 0. Avoid those params and just use 0 inside the
function. Review parameter types changing for more proper
ones.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 +---
1 file changed
Some preprocessor definitions are using a custom implementation of
BIT macro. Just use linux kernel BIT macro instead.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers
The pcie node of the device tree only contains registers
for the host-bridge and pcie port 0. Add the pcie port 1
and pcie port 2 also.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-dts/mt7621.dtsi | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers
RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR are defined to be directly
referenced for read and write. Use pcie_read and pcie_write instead changing
its definition to a simple relative offset to pcie base address.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621
There some macros that are not being used. Remove them.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 24 +---
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers/staging/mt7621
RALINK_PCI_CONFIG_DATA_VIRTUAL_REG is a very long name. Make it a bit
shorter renaming it to RALINK_PCI_CONFIG_DATA.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/mt7621
pcibios_* remaining code is not neccessary at all. We can use
map_irq set to of_irq_parse_and_map_pci driver 'probe' function.
Remove this code.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 33 +
1 file changed, 1 insertion
RALINK_PCI_BASE has no sense and this driver has base address readed
and mapped from device tree. Remove remaining uses of it and
change code to use pcie_read and pcie_write functions in places
where this was being used.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci
Driver is using now pci subsystem generics reads and writes and requesting
bus resources without using legacy code functions. Because of this there is
a lot of dead code that can be removed.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 153
est regards,
Sergio Paracuellos
Sergio Paracuellos (15):
staging: mt7621-pci: use generic kernel pci subsystem read and write
staging: mt7621-pci: remove dead code derived to not use custom reads
and writes
staging: mt7621-pci: add pcie_write and pcie_read helpers
staging: mt7621-pci:
Introdice this functions to make easier to write/read to/from
an offset relative to base address
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers
is not using PCI_LEGACY code anymore and shall use the
PCI_DRIVERS_GENERIC option to correct compile it. Add also new
Kconfig file for this controller setting there its correct dependencies.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/Kconfig | 2 +
drivers/staging
read_config function is always called with bus and func
being 0. Avoid those params and just use 0 inside the
function. Return readed value instead pass a reference
parameter.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 32 +++-
1
On Tue, Jul 31, 2018 at 08:55:52AM +1000, NeilBrown wrote:
> On Mon, Jul 30 2018, Sergio Paracuellos wrote:
>
> > This patch series include an attempt to avoid the use of custom
> > read and writes in driver code and use PCI subsystem common ones.
> >
> > In order
On Tue, Jul 31, 2018 at 03:25:43PM +1000, NeilBrown wrote:
> On Tue, Jul 31 2018, Sergio Paracuellos wrote:
>
> > On Tue, Jul 31, 2018 at 08:55:52AM +1000, NeilBrown wrote:
> >> On Mon, Jul 30 2018, Sergio Paracuellos wrote:
> >>
> >> > This patch
On Tue, Jul 31, 2018 at 08:55:52AM +1000, NeilBrown wrote:
> On Mon, Jul 30 2018, Sergio Paracuellos wrote:
>
> > This patch series include an attempt to avoid the use of custom
> > read and writes in driver code and use PCI subsystem common ones.
> >
> > In order
On Thu, Jul 26, 2018 at 6:50 AM, NeilBrown wrote:
> On Wed, Jul 25 2018, Sergio Paracuellos wrote:
>
>> On Wed, Jul 25, 2018 at 08:21:35AM +1000, NeilBrown wrote:
>>> On Mon, Jul 16 2018, Sergio Paracuellos wrote:
>>>
>>> > This patch series inc
On Thu, Jul 26, 2018 at 04:45:41PM +1000, NeilBrown wrote:
> On Thu, Jul 26 2018, Sergio Paracuellos wrote:
>
> > On Thu, Jul 26, 2018 at 6:50 AM, NeilBrown wrote:
> >> On Wed, Jul 25 2018, Sergio Paracuellos wrote:
> >>
> >>> On Wed, Jul 25,
On Thu, Jul 26, 2018 at 04:45:41PM +1000, NeilBrown wrote:
> On Thu, Jul 26 2018, Sergio Paracuellos wrote:
>
> > On Thu, Jul 26, 2018 at 6:50 AM, NeilBrown wrote:
> >> On Wed, Jul 25 2018, Sergio Paracuellos wrote:
> >>
> >>> On Wed, Jul 25,
On Thu, Jul 26, 2018 at 08:02:17PM +1000, NeilBrown wrote:
> On Thu, Jul 26 2018, Sergio Paracuellos wrote:
>
> >
> > Ok, I think the problem is we are not setting the bridge->windows retrieved
> > with devm_request_pci_bus_resources in "res".
Driver is using now pci subsystem generics reads and writes and requesting
bus resources without using legacy code functions. Because of this there is
a lot of dead code that can be removed.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 135
Introdice this functions to make easier to write/read to/from
an offset relative to base address
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers
]32 in favour
of pci_generic_config_[read|write] and change map_bus implemen-
tation for hopefully the right one.
Best regards,
Sergio Paracuellos
Sergio Paracuellos (15):
staging: mt7621-pci: use generic kernel pci subsystem read and write
staging: mt7621-pci: remove dead c
Use pcie_[read|write] fucntions to read and write controller registers.
Define those only by offset and pass controller offset + register offset
relative to base address to functions.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 70
Some preprocessor definitions are using a custom implementation of
BIT macro. Just use linux kernel BIT macro instead.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers
pcibios_* remaining code is not neccessary at all. We can use
map_irq set to of_irq_parse_and_map_pci driver 'probe' function.
Remove this code.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 33 +
1 file changed, 1 insertion
read_config function is always called with bus and func
being 0. Avoid those params and just use 0 inside the
function. Return readed value instead pass a reference
parameter.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 32 +++-
1
RALINK_PCI_BASE has no sense and this driver has base address readed
and mapped from device tree. Remove remaining uses of it and
change code to use pcie_read and pcie_write functions in places
where this was being used.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci
RALINK_PCI_CONFIG_DATA_VIRTUAL_REG is a very long name. Make it a bit
shorter renaming it to RALINK_PCI_CONFIG_DATA.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/mt7621
There some macros that are not being used. Remove them.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 24 +---
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers/staging/mt7621
RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR are defined to be directly
referenced for read and write. Use pcie_read and pcie_write instead changing
its definition to a simple relative offset to pcie base address.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621
The pcie node of the device tree only contains registers
for the host-bridge and pcie port 0. Add the pcie port 1
and pcie port 2 also.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-dts/mt7621.dtsi | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers
is not using PCI_LEGACY code anymore and shall use the
PCI_DRIVERS_GENERIC option to correct compile it. Add also new
Kconfig file for this controller setting there its correct dependencies.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/Kconfig | 2 +
drivers/staging
write_config function is always called with bus and func
being 0. Avoid those params and just use 0 inside the
function. Review parameter types changing for more proper
ones.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 +---
1 file changed
Instead of custom macros use pcie_read and pcie_write functions.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 67 -
1 file changed, 32 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b
There are some includes that are being used that are not really
needed to correct driver compilation. Remove them and reorder the
rest alphabetically.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 22 --
1 file changed, 8 insertions(+), 14
On Tue, Jul 31, 2018 at 03:25:43PM +1000, NeilBrown wrote:
> On Tue, Jul 31 2018, Sergio Paracuellos wrote:
>
> > On Tue, Jul 31, 2018 at 08:55:52AM +1000, NeilBrown wrote:
> >> On Mon, Jul 30 2018, Sergio Paracuellos wrote:
> >>
> >> > This patch
On Wed, Aug 01, 2018 at 07:56:38AM +1000, NeilBrown wrote:
> On Tue, Jul 31 2018, Sergio Paracuellos wrote:
>
> > This patch series include an attempt to avoid the use of custom
> > read and writes in driver code and use PCI subsystem common ones.
> >
> > In order
Instead of custom macros use pcie_read and pcie_write functions.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 67 -
1 file changed, 32 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b
read_config function is always called with bus and func
being 0. Avoid those params and just use 0 inside the
function. Return readed value instead pass a reference
parameter.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 32 +++-
1
]32 in favour
of pci_generic_config_[read|write] and change map_bus implemen-
tation for hopefully the right one.
Best regards,
Sergio Paracuellos
Sergio Paracuellos (15):
staging: mt7621-pci: use generic kernel pci subsystem read and write
staging: mt7621-pci: remove dead c
The pcie node of the device tree only contains registers
for the host-bridge and pcie port 0. Add the pcie port 1
and pcie port 2 also.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-dts/mt7621.dtsi | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers
RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR are defined to be directly
referenced for read and write. Use pcie_read and pcie_write instead changing
its definition to a simple relative offset to pcie base address.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621
Some preprocessor definitions are using a custom implementation of
BIT macro. Just use linux kernel BIT macro instead.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers
RALINK_PCI_CONFIG_DATA_VIRTUAL_REG is a very long name. Make it a bit
shorter renaming it to RALINK_PCI_CONFIG_DATA.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/mt7621
pcibios_* remaining code is not neccessary at all. We can use
map_irq set to of_irq_parse_and_map_pci driver 'probe' function.
Remove this code.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 33 +
1 file changed, 1 insertion
RALINK_PCI_BASE has no sense and this driver has base address readed
and mapped from device tree. Remove remaining uses of it and
change code to use pcie_read and pcie_write functions in places
where this was being used.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci
There some macros that are not being used. Remove them.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 24 +---
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers/staging/mt7621
Use pcie_[read|write] fucntions to read and write controller registers.
Define those only by offset and pass controller offset + register offset
relative to base address to functions.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 70
There are some includes that are being used that are not really
needed to correct driver compilation. Remove them and reorder the
rest alphabetically.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 22 --
1 file changed, 8 insertions(+), 14
is not using PCI_LEGACY code anymore and shall use the
PCI_DRIVERS_GENERIC option to correct compile it. Add also new
Kconfig file for this controller setting there its correct dependencies.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/Kconfig | 2 +
drivers/staging
Driver is using now pci subsystem generics reads and writes and requesting
bus resources without using legacy code functions. Because of this there is
a lot of dead code that can be removed.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 128
Introdice this functions to make easier to write/read to/from
an offset relative to base address
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers
write_config function is always called with bus and func
being 0. Avoid those params and just use 0 inside the
function. Review parameter types changing for more proper
ones.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 +---
1 file changed
On Wed, Aug 1, 2018 at 6:37 AM, Sergio Paracuellos
wrote:
> On Wed, Aug 01, 2018 at 07:56:38AM +1000, NeilBrown wrote:
>> On Tue, Jul 31 2018, Sergio Paracuellos wrote:
>>
>> > This patch series include an attempt to avoid the use of custom
>> > read and
On Thu, Aug 02, 2018 at 08:09:48AM +1000, NeilBrown wrote:
> On Wed, Aug 01 2018, Sergio Paracuellos wrote:
>
> > This patch series include an attempt to avoid the use of custom
> > read and writes in driver code and use PCI subsystem common ones.
> >
> > In order
write_config function is always called with bus and func
being 0. Avoid those params and just use 0 inside the
function. Review parameter types changing for more proper
ones.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 +---
1 file changed
Introdice this functions to make easier to write/read to/from
an offset relative to base address
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers
RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR are defined to be directly
referenced for read and write. Use pcie_read and pcie_write instead changing
its definition to a simple relative offset to pcie base address.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621
Driver is using now pci subsystem generics reads and writes and requesting
bus resources without using legacy code functions. Because of this there is
a lot of dead code that can be removed.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 128
Instead of custom macros use pcie_read and pcie_write functions.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 67 -
1 file changed, 32 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b
There are some includes that are being used that are not really
needed to correct driver compilation. Remove them and reorder the
rest alphabetically.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 22 --
1 file changed, 8 insertions(+), 14
lly the right one.
Best regards,
Sergio Paracuellos
Sergio Paracuellos (15):
staging: mt7621-pci: use generic kernel pci subsystem read and write
staging: mt7621-pci: remove dead code derived to not use custom reads
and writes
staging: mt7621-pci: add pcie_write and pcie_read helpers
stag
There some macros that are not being used. Remove them.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 24 +---
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers/staging/mt7621
is not using PCI_LEGACY code anymore and shall use the
PCI_DRIVERS_GENERIC option to correct compile it. Add also new
Kconfig file for this controller setting there its correct dependencies.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/Kconfig | 2 +
drivers/staging
RALINK_PCI_BASE has no sense and this driver has base address readed
and mapped from device tree. Remove remaining uses of it and
change code to use pcie_read and pcie_write functions in places
where this was being used.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci
RALINK_PCI_CONFIG_DATA_VIRTUAL_REG is a very long name. Make it a bit
shorter renaming it to RALINK_PCI_CONFIG_DATA.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/mt7621
Some preprocessor definitions are using a custom implementation of
BIT macro. Just use linux kernel BIT macro instead.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers
read_config function is always called with bus and func
being 0. Avoid those params and just use 0 inside the
function. Return readed value instead pass a reference
parameter.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 32 +++-
1
Use pcie_[read|write] fucntions to read and write controller registers.
Define those only by offset and pass controller offset + register offset
relative to base address to functions.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 70
The pcie node of the device tree only contains registers
for the host-bridge and pcie port 0. Add the pcie port 1
and pcie port 2 also.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-dts/mt7621.dtsi | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers
pcibios_* remaining code is not neccessary at all. We can use
map_irq set to of_irq_parse_and_map_pci driver 'probe' function.
Remove this code.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 33 +
1 file changed, 1 insertion
On Thu, Jul 26, 2018 at 1:24 PM, Sergio Paracuellos
wrote:
> On Thu, Jul 26, 2018 at 08:02:17PM +1000, NeilBrown wrote:
>> On Thu, Jul 26 2018, Sergio Paracuellos wrote:
>>
>> >
>> > Ok, I think the problem is we are not sett
On Mon, Jul 30, 2018 at 03:20:47PM +1000, NeilBrown wrote:
> On Fri, Jul 27 2018, Sergio Paracuellos wrote:
>
> > map_bus callback is called before every .read/.write operation.
> > Implement it and change custom read write operations for the
> > pci subsystem generics.
On Mon, Jul 30, 2018 at 03:20:47PM +1000, NeilBrown wrote:
> On Fri, Jul 27 2018, Sergio Paracuellos wrote:
>
> > map_bus callback is called before every .read/.write operation.
> > Implement it and change custom read write operations for the
> > pci subsystem generics.
On Mon, Jul 30, 2018 at 05:05:15PM +1000, NeilBrown wrote:
> On Mon, Jul 30 2018, Sergio Paracuellos wrote:
>
> > On Mon, Jul 30, 2018 at 03:20:47PM +1000, NeilBrown wrote:
> >> On Fri, Jul 27 2018, Sergio Paracuellos wrote:
> >>
> >> > map_bus ca
Some preprocessor definitions are using a custom implementation of
BIT macro. Just use linux kernel BIT macro instead.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers
There some macros that are not being used. Remove them.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 29 +
1 file changed, 1 insertion(+), 28 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers/staging
pcibios_* remaining code is not neccessary at all. We are mapping
irq using of_irq_parse_and_map_pci and swizzle_irq which are set
in driver 'probe' function. Remove this code. No kernel config
option CONFIG_PCI_DRIVERS_LEGACY should be included anymore.
Signed-off-by: Sergio Paracuellos
ate a new port structure (platform has 3 pcie controllers)
- Replace the use of pci_generic_config_[read|write]32 in favour
of pci_generic_config_[read|write] and change map_bus implemen-
tation for hopefully the right one.
Best regards,
Sergio Paracuellos
Sergio Paracuellos
write_config function is always called with bus and func
being 0. Avoid those params and just use 0 inside the
function. Review parameter types changing for more proper
ones.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 +---
1 file changed
801 - 900 of 1965 matches
Mail list logo