resources(dev, res);
> - if (err < 0)
> - return err;
> -
> - return 0;
> + return devm_request_pci_bus_resources(dev, res);
> }
>
In the patch title, the "mt7621-pci" is repeated twice. With that changed:
Reviewed-by: Sergio Paracuellos
>
Hi Greg,
On Mon, May 27, 2019 at 6:37 AM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 24/5/19 3:35 pm, Sergio Paracuellos wrote:
> > On Fri, May 24, 2019 at 2:35 AM Greg Ungerer wrote:
> >> On 23/5/19 3:26 pm, Sergio Paracuellos wrote:
> >>> On Thu, May
Hi Greg,
On Mon, May 27, 2019 at 9:29 AM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 27/5/19 4:35 pm, Sergio Paracuellos wrote:
> > On Mon, May 27, 2019 at 6:37 AM Greg Ungerer wrote:
> >> On 24/5/19 3:35 pm, Sergio Paracuellos wrote:
> >>> On Fri, May
Hi Greg,
On Wed, May 29, 2019 at 9:11 AM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 27/5/19 6:02 pm, Sergio Paracuellos wrote:
> > On Mon, May 27, 2019 at 9:29 AM Greg Ungerer wrote:
> >> On 27/5/19 4:35 pm, Sergio Paracuellos wrote:
> >>> On Mon, May
Hi Greg,
On Thu, May 30, 2019 at 3:46 AM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 30/5/19 10:44 am, Greg Ungerer wrote:
> > On 29/5/19 6:08 pm, Sergio Paracuellos wrote:
> > [snip]
> >> I have added gpio consumer stuff and reorder a bit the code to be more
Hi Greg,
No luck for us also today :-(
On Mon, Jun 3, 2019 at 3:26 AM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 31/5/19 10:37 pm, Sergio Paracuellos wrote:
> > On Thu, May 30, 2019 at 3:46 AM Greg Ungerer wrote:
> >> On 30/5/19 10:44 am, Greg Ungerer wrote:
>
Hi Greg,
On Mon, Jun 3, 2019 at 2:32 PM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 3/6/19 3:34 pm, Sergio Paracuellos wrote:
> > On Mon, Jun 3, 2019 at 3:26 AM Greg Ungerer wrote:
> >> On 31/5/19 10:37 pm, Sergio Paracuellos wrote:
> >>> On Thu, May
Hi Greg,
On Tue, Jun 4, 2019 at 3:31 AM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 4/6/19 5:59 am, Sergio Paracuellos wrote:
> > On Mon, Jun 3, 2019 at 2:32 PM Greg Ungerer wrote:
> >> On 3/6/19 3:34 pm, Sergio Paracuellos wrote:
> >>> On Mon, Jun
Hi Greg,
Thanks for the traces.
On Tue, Jun 4, 2019 at 9:14 AM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 4/6/19 3:06 pm, Sergio Paracuellos wrote:
> > On Tue, Jun 4, 2019 at 3:31 AM Greg Ungerer wrote:
> >> On 4/6/19 5:59 am, Sergio Paracuellos wrote:
> >>&
Hi Greg,
On Wed, Jun 5, 2019 at 6:01 AM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 4/6/19 7:36 pm, Sergio Paracuellos wrote:
> > On Tue, Jun 4, 2019 at 9:14 AM Greg Ungerer wrote:
> >> On 4/6/19 3:06 pm, Sergio Paracuellos wrote:
> >>> On Tue, Jun
Hi Greg,
On Wed, Jun 5, 2019 at 7:47 AM Sergio Paracuellos
wrote:
>
> Hi Greg,
>
> On Wed, Jun 5, 2019 at 6:01 AM Greg Ungerer wrote:
> >
> > Hi Sergio,
> >
> > On 4/6/19 7:36 pm, Sergio Paracuellos wrote:
> > > On Tue, Jun 4, 2019 at 9:14 AM
Hi Greg,
On Thu, Jun 6, 2019 at 5:06 AM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 5/6/19 10:28 pm, Sergio Paracuellos wrote:
> > On Wed, Jun 5, 2019 at 7:47 AM Sergio Paracuellos
> > wrote:
> >> On Wed, Jun 5, 2019 at 6:01 AM Greg Ungerer wrote:
> >&
changes something?
If it is not a reset issue it might be something with the boot order,
according to the driver changes with properly working version.
> Regards
> Gregç
Best regards,
Sergio Paracuellos
>
>
>
> > I've put all the boot message logs (for both successe
/2019-June/134947.html
Sergio Paracuellos (4):
staging: mt7621-pci: fix two messages in driver code
staging: mt7621-pci: use gpio perst instead of builtin behaviour
staging: mt7621-dts: add gpio perst to pcie bindings node
staging: mt7621-pci: dt-bindings: add perst-gpio to sample bin
Both driver and device tree have been updated to use GPIO perst.
Update bindings documentation also.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/mediatek,mt7621-pci.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/mt7621-pci/mediatek,mt7621-pci.txt
Driver has been changed to use perts gpio reset instead of
perst builtin behaviour. Update device tree accordly.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-dts/mt7621.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/mt7621-dts/mt7621.dtsi
b/drivers
There are two messages in driver code which are not correct.
Fix both of them to clarify boot runs.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b
Some boards seems to ignore the PERST builtin behaviour to properly
perform a pcie line reset. Use gpio PERST behaviour instead which
seems to be more common.
Fixes: bd1a05bd87ad ("staging: mt7621-pci: use PERST_N instead of gpio control")
Signed-off-by: Sergio Paracuellos
---
drive
Hi Greg,
On Thu, Jun 20, 2019 at 2:40 AM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 19/6/19 5:44 pm, Sergio Paracuellos wrote:
> > Some boards seems to ignore builtin perst configuration and use gpio
> > instead. This approach seems to be more common. Hence, update the dr
re confortable for you.
>
> thanks,
>
> greg k-h
Best regards,
Sergio Paracuellos
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
When there is no pcie link detected we have to properly disable the
port pcie clock.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers/staging/mt7621-pci/pci
'mt7621_pcie_init_port' error path.
* Move driver to init in a later stage using 'module_init' instead of using
'arch_initcall'.
Patches are only compile-tested. It would be awasome to be tested before applied
them (mainly the change to 'module_init' stuff).
Hope this help
Add missing call to 'phy_exit' function if the phy_power_on call fails.
With this call added the error path is properly handled.
Fixes: 07420a02b003 ("staging: mt7621-pci: use gpio perst instead of builtin
behaviour")
Signed-off-by: Sergio Paracuellos
---
drivers/staging/m
This driver has dependencies on mt7621-gpio and mt7621-pci-phy which
are init in later stages. Hence, when this driver is probed it is always
returning 'EPROBE_DEFER' and being initialized afterwards. Use function
'module_init' to just initialize later.
Signed-off-by
The clock which has been used here is not about the phy but the pcie port.
It has been properly handled into host pcie driver code. Hence, remove it
from here which is the correct thing to do.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 8
1
Hi Greg,
On Fri, Jun 21, 2019 at 2:35 PM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 21/6/19 4:15 pm, Sergio Paracuellos wrote:
> > This patch series properly handle minor issues in this driver. These are:
> > * Disable pcie port clock on pci dirver instead of doing it
Hi Brett,
On Sun, Jun 23, 2019 at 4:15 AM Brett Neumeier wrote:
>
> On Fri, Jun 21, 2019 at 7:35 AM Greg Ungerer wrote:
> >
> > Hi Sergio,
> >
> > On 21/6/19 4:15 pm, Sergio Paracuellos wrote:
> > > This patch series properly handle minor issues in this
Hi Greg,
On Tue, Jun 25, 2019 at 7:10 AM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 23/6/19 3:58 pm, Sergio Paracuellos wrote:
> > On Sun, Jun 23, 2019 at 4:15 AM Brett Neumeier wrote:
> >> On Fri, Jun 21, 2019 at 7:35 AM Greg Ungerer wrote:
> >>> On 21
Hi Greg,
On Tue, Jun 25, 2019 at 7:18 AM Sergio Paracuellos
wrote:
>
> Hi Greg,
>
> On Tue, Jun 25, 2019 at 7:10 AM Greg Ungerer wrote:
> >
> > Hi Sergio,
> >
> > On 23/6/19 3:58 pm, Sergio Paracuellos wrote:
> > > On Sun, Jun 23, 2019 at 4:15 AM Bre
Hi Greg,
On Wed, Jun 26, 2019 at 5:31 AM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 25/6/19 10:47 pm, Sergio Paracuellos wrote:
> > On Tue, Jun 25, 2019 at 7:18 AM Sergio Paracuellos
> > wrote:
> >> On Tue, Jun 25, 2019 at 7:10 AM Greg Ungerer wrote:
> >&g
Add missing parenthesis to PCIE_FTS_NUM_LO macro to do the
same it was being done in original code.
Fixes: a4b2eb912bb1 ("staging: mt7621-pci: rewrite RC FTS configuration")
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 2 +-
1 file changed, 1 inser
Hi Greg,
On Wed, Jun 26, 2019 at 2:18 PM Greg Ungerer wrote:
>
> Hi Sergio,
>
> On 26/6/19 5:10 pm, Sergio Paracuellos wrote:
> > On Wed, Jun 26, 2019 at 5:31 AM Greg Ungerer wrote:
> >> On 25/6/19 10:47 pm, Sergio Paracuellos wrote:
> >>> On Tue, Jun
Hi Brett,
On Fri, Jul 5, 2019 at 8:44 PM Brett Neumeier wrote:
>
> On Wed, Jun 26, 2019 at 7:45 AM Sergio Paracuellos
> wrote:
> > No problem, I also miss them rewritting code. That is bad :((.
> > > BTW, I applied that on top of your other recent fixes (that ones
>
ed++;
> }
> }
> --
> 2.20.1
>
I don't know what tree and branch are you using for this but this is
kind of old code... You should
use staging git tree, 'staging-next' branch for staging patches to
avoid problems like this.
Best regards,
Sergio Paracuellos
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Hi Brett,
On Sat, Jul 6, 2019 at 3:43 PM Brett Neumeier wrote:
>
> On Sat, Jul 6, 2019 at 4:00 AM Sergio Paracuellos
> wrote:
> > > Out of curiosity, if it's not too complex an answer to go into, what's
> > > the benefit of the staging-next driver? Is the
also
returning zero on success.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers/staging/mt7621-pci/pci-mt7621.c
index 2e37fd136ab8..6b98827da57
Adding spaces between if condition and parenthesis are not
needed at all and checkpatch script complains about them.
Fix one in driver code.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
This patch series add remaining cleanups from previous series
which had problems to applied from here:
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-June/121744.html
Just send remaining patches in a new patch serie.
Hope this helps.
Best regards,
Sergio Paracuellos
This commit silence checkpatch warnings about lines which
exceeds 80 chars.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 26 ++---
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/mt7621-pinctrl
Kernel coding style use tabs for indent code instead of spaces.
Fix some places where spaces were being used silencing also
checkpatch script complains.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions
Function parameters along the code has different alignment styles.
Just unify all of them making style consistent.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 29 -
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git
For a constant format without additional arguments, use seq_puts()
instead of seq_printf() fixing also the following checkpatch.pl
warning: 'Prefer seq_puts to seq_printf'
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +-
1 file changed, 1
According to documentation 'pinctrl-bindings.txt' bindings 'group'
and 'function' can be used directly. So replace all of them.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-dts/mt7621.dtsi | 48 +-
1 file changed,
Function rt2880_pinctrl_dt_node_to_map was using 'kzalloc' to
reserve map memory. There is a 'pinctrl_utils_reserve_map' to
do this function. Just use it.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 12 +---
1 file changed
Struct 'rt2880_priv' contains a field 'gpio' which is defined
as uint8_t and should be defined with 'u8' which is preferred.
Update some cast along the code related with this new change.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctr
roups using
'of_property_for_each_string' calling 'pinctrl_utils_add_map_mux'
function which is the same of the custom function in this driver code
'rt2880_pinctrl_dt_subnode_to_map' which is not needed anymore.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/
There was a custom 'rt2880_pinctrl_dt_free_map' function which
it was doing the same as pinctrl_utils_free_map defined in
'pinctrl-utils.h' header file. Use it instead avoiding
code duplications.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/p
Trivial change to have only one return in 'rt2880_get_group_name'
function using a ternary operator instead of an if statement and
two returns.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 5 +
1 file changed, 1 insertion(+), 4 deletion
The debug information provided by this function does not make
sense at all, so just remove it.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
b
We don't really need initialization of this at such an early stage.
Just use builtin_platform_driver to initialize this driver.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/dr
Add driver support for gpio of MT7621 SoC.
Signed-off-by: Sergio Paracuellos
---
drivers/gpio/Kconfig | 8 ++
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-mt7621.c | 320 +
3 files changed, 329 insertions(+)
create mode 100644
Add a devicetree binding documentation for the mt7621 gpio.
Signed-off-by: Sergio Paracuellos
---
.../bindings/gpio/mediatek,mt7621-gpio.txt | 35 ++
1 file changed, 35 insertions(+)
create mode 100644
Documentation/devicetree/bindings/gpio/mediatek,mt7621-gpio.txt
,
Sergio Paracuellos
Sergio Paracuellos (2):
gpio: mediatek: add driver for MT7621
dt-bindings: document gpio-mt7621 bindings
.../bindings/gpio/mediatek,mt7621-gpio.txt | 35 +++
drivers/gpio/Kconfig | 8 +
drivers/gpio/Makefile
changes
Hope this helps and thanks in advance.
Best regards,
Sergio Paracuellos
Sergio Paracuellos (2):
gpio: mediatek: add driver for MT7621
dt-bindings: document gpio-mt7621 bindings
.../bindings/gpio/mediatek,mt7621-gpio.txt | 35 +++
drivers/gpio/Kconfig
Add driver support for gpio of MT7621 SoC.
Signed-off-by: Sergio Paracuellos
---
drivers/gpio/Kconfig | 8 ++
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-mt7621.c | 320 +
3 files changed, 329 insertions(+)
create mode 100644
Add a devicetree binding documentation for the mt7621 gpio.
Signed-off-by: Sergio Paracuellos
---
.../bindings/gpio/mediatek,mt7621-gpio.txt | 35 ++
1 file changed, 35 insertions(+)
create mode 100644
Documentation/devicetree/bindings/gpio/mediatek,mt7621-gpio.txt
sion. Last patch
series was applied yesterday... Maybe you have not run against the
updated tree?
This patch fix them:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?h=staging-testing&id=bfb623c5b0935a2e4b5fe86eab79a37a37b67209
>
> regards,
> dan car
please drop us a note to
> help improve the system]
>
> url:
> https://github.com/0day-ci/linux/commits/Sergio-Paracuellos/gpio-mediatek-driver-for-gpio-chip-in-MT7621-SoC/20180629-225420
> base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
>
On Fri, Jun 29, 2018 at 6:52 PM, Sergio Paracuellos
wrote:
> On Fri, Jun 29, 2018 at 6:43 PM, kbuild test robot wrote:
>> Hi Sergio,
>>
>> Thank you for the patch! Yet something to improve:
>>
>> [auto build test ERROR on gpio/for-next]
>> [also buil
On Sat, Jun 30, 2018 at 7:47 AM, NeilBrown wrote:
> On Mon, Jun 18 2018, Sergio Paracuellos wrote:
>
>> Banks shouldn't be defined in DT if number of resources
>> per bank is not variable. We actually know that this SoC
>> has three banks so take that into account in
On Fri, Jun 29, 2018 at 2:43 PM, Sergio Paracuellos
wrote:
> Add driver support for gpio of MT7621 SoC.
>
> Signed-off-by: Sergio Paracuellos
> ---
> drivers/gpio/Kconfig | 8 ++
> drivers/gpio/Makefile | 1 +
> drivers/gpi
On Thu, Jul 05, 2018 at 10:51:39AM +1000, NeilBrown wrote:
> On Sat, Jun 30 2018, Sergio Paracuellos wrote:
>
> > On Sat, Jun 30, 2018 at 7:47 AM, NeilBrown wrote:
> >> On Mon, Jun 18 2018, Sergio Paracuellos wrote:
> >>
> >>> Banks shouldn't be
This series fix problem related with the last changes included
to use only one node in the device tree and some gpio banks
naming issues.
Hope this helps.
Best regards,
Sergio Paracuellos
Sergio Paracuellos (4):
staging: mt7621-gpio: set irq chip name only once
staging: mt7621-gpio: use
There is only one irq chip so set its name only once
in driver probe function.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c
b/drivers/staging/mt7621
bgpio_init function set different data of the gpio chip, like the name.
We want specific name for each bank so to get that not overwritten
move all custom changes after the bgpio_init function call.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 7 ---
1
The default gpio.of_xlate function assumes there is one gpio chip
for each devicetree node. Device tree had changed to only use one node,
which corresponds to 3 different gpio chips now. For that approach
to work we need a custom xlate function.
Signed-off-by: Sergio Paracuellos
---
drivers
Instead of using a custom function to return desired name for gpio
use the default assigned one and concat it '-bankN' suffix using
devm_kasprintf kernel function.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 12 ++--
1 file changed, 2
On Thu, Jul 05, 2018 at 04:27:31PM +1000, NeilBrown wrote:
> On Thu, Jul 05 2018, Sergio Paracuellos wrote:
>
> > This series fix problem related with the last changes included
> > to use only one node in the device tree and some gpio banks
> > naming issues.
> >
>
Add driver support for gpio of MT7621 SoC.
Signed-off-by: Sergio Paracuellos
Reviewed-by: NeilBrown
---
drivers/gpio/Kconfig | 8 ++
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-mt7621.c | 331 +
3 files changed, 340 insertions
making it simple
- Implement high and low level irqs
- avoid include gpio.h
- use builtin_platform_driver
- add COMPILE_TEST
- cleanups after this changes
Hope this helps and thanks in advance.
Best regards,
Sergio Paracuellos
Sergio Paracuellos (2):
gpio: mediatek: add driver for MT7621
Add a devicetree binding documentation for the mt7621 gpio.
Signed-off-by: Sergio Paracuellos
Reviewed-by: NeilBrown
---
.../bindings/gpio/mediatek,mt7621-gpio.txt | 35 ++
1 file changed, 35 insertions(+)
create mode 100644
Documentation/devicetree/bindings/gpio
to easily obtain config address. Also to
get pci base address a global 'mt7621_pci_base' variable has been
included and initialized as a pointer to RALINK_PCI_BASE in driver
probe function. With this changes LOC is clearly decreased and
readability is increased.
Signed-off-by
Use a for loop to check pci port N_FTS in each controller.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers/staging/mt7621-pci/pci
In driver probe function there are some ugly initialization to
use gpios. Factor out to mt7621_pci_init_gpios function making
use of readl and writel to read and write memory.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 35 +++--
1
This patch series clean up a bit mt7621-pci driver.
Changes from v2:
- It includes new 17 patches from PATCH 2 to PATCH 18
- PATCH 1 was send before alone and is being included
as it is in this new series.
Hope this helps.
Best regards,
Sergio Paracuellos
Sergio Paracuellos
mt7621_pci_reg_[read|write] functions
where the base is neing taking into account to get and do the correct
operations. Register useds along the code modified to use the new
approach.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 81 -
1 file
There are some comments not needed at all. Remove them.
Adjust one comment to follow kernel style.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621
Factor out mt7621_pci_enable function to avoid duplicate code
in driver probe function. This increase readability.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 36 ++---
1 file changed, 15 insertions(+), 21 deletions(-)
diff --git
ASSERT_SYSRST_PCIE and DEASSERT_SYSRST_PCIE are defined as preprocessor
macros and can be defined as inline functions instead which are preferred.
Do it and rename to mt7621_pcie_assert_sysrst and mt7621_pcie_deassert_sysrst
respectively.
Signed-off-by: Sergio Paracuellos
---
drivers/staging
RALINK_PCI_MEMBASE, RALINK_PCI_IOBASE, RALINK_PCI_PCICFG_ADDR and
RALINK_PCI_PCIMSK_ADDR are using very ugly pointer arithmetics to
read and write along the code. Instead of doing this, use the
mt7621_pci_reg_read and mt7621_pci_reg_write functions making
this a bit cleaner.
Signed-off-by: Sergio
which can be used instead of
the full boiler plate text.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 28 ++--
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers/staging/mt762
There are some definitions which are using its custom
implementation of BIT macro. Just just BIT macro instead.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 31 ---
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a
There was a missing line between declarations and code statements in function
setup_cm_memory_region. this improves readability.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/mt7621-pci/pci
to easily obtain config address. Also to
get pci base address a global 'mt7621_pci_base' variable has been
included and initialized as a pointer to RALINK_PCI_BASE in driver
probe function. With this changes LOC is clearly decreased and
readability is increased.
Signed-off-by
set fields. Controller number
will be the array index 'pcie_controllers' which subs the 'offsets'
array.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 120 ++--
1 file changed, 67 insertions(+), 53 deletions(-)
diff
In places where function mt7621_pci_get_cfgaddr is being used, there
is a common pattern that could be included inside mt7621_pci_get_cfgaddr.
Include it improving readability.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20
1 file
set_pcie_phy can be refactor to use mt7621_pci_reg_write and
mt7621_pci_reg_read functions intead of use pointer arithmetics.
Use them and simplify implicated calls and definitions along the
code.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 122
to those function to match the new prototypes.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 56 -
1 file changed, 27 insertions(+), 29 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
b/drivers/staging/mt7621-
There are a lot of definitions that are not being used at all.
Just remove them cleaning the code a bit.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 20 ++--
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/mt7621
RALINK_PCI_CONFIG_DATA_VIRTUAL_REG is a very long name and makes
lines to be very long when it is used. Rename it to a shorter one
RALINK_PCI_CONFIG_DATA.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions
Factor out mt7621_pci_configure function to avoid a lot of
duplicated code in driver probe function.
Signed-off-by: Sergio Paracuellos
---
drivers/staging/mt7621-pci/pci-mt7621.c | 35 -
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/drivers
On Sun, Jul 8, 2018 at 3:14 PM, Greg KH wrote:
> On Sun, Jul 08, 2018 at 02:57:08PM +0200, Sergio Paracuellos wrote:
>> This patch series clean up a bit mt7621-pci driver.
>
> Your subject line for the 00/XX email needs some work (like putting what
> driver and subsystem it i
On Sun, Jul 8, 2018 at 3:16 PM, Greg KH wrote:
> On Sun, Jul 08, 2018 at 02:57:26PM +0200, Sergio Paracuellos wrote:
>> It's good to have SPDX identifiers in driver files to make it easier to
>> audit the kernel tree for correct licenses.
>>
>> Fix up the one of s
On Sun, Jul 8, 2018 at 4:22 PM, Greg KH wrote:
> On Sun, Jul 08, 2018 at 04:06:08PM +0200, Sergio Paracuellos wrote:
>> On Sun, Jul 8, 2018 at 3:16 PM, Greg KH wrote:
>> > On Sun, Jul 08, 2018 at 02:57:26PM +0200, Sergio Paracuellos wrote:
>> >> It's good to ha
On Sun, Jul 8, 2018 at 5:36 PM, Greg KH wrote:
> On Sat, Jul 07, 2018 at 09:48:37PM +0200, Sergio Paracuellos wrote:
>> This commit simplifies and clean a lot of stuff related with pci
>> reads and writes. It deletes a lot of not needed at all functions
>> and use kernel arc
On Mon, Jul 09, 2018 at 08:48:14AM +1000, NeilBrown wrote:
> On Thu, Jun 07 2018, Sergio Paracuellos wrote:
>
> > Function rt2880_pinctrl_dt_node_to_map was using 'kzalloc' to
> > reserve map memory. There is a 'pinctrl_utils_reserve_map' to
> > do th
On Mon, Jul 09, 2018 at 09:40:18AM +1000, NeilBrown wrote:
> On Thu, Jun 28 2018, Sergio Paracuellos wrote:
>
> > We don't really need initialization of this at such an early stage.
> > Just use builtin_platform_driver to initialize this driver.
> >
> >
On Mon, Jul 09, 2018 at 07:16:41AM +1000, NeilBrown wrote:
> On Sun, Jul 08 2018, Sergio Paracuellos wrote:
> >
> > I can try to split this a bit but I don't really know how to do atomic
> > changes because
> > of the related things included here.
>
> Some su
On Mon, Jul 09, 2018 at 09:13:02AM +1000, NeilBrown wrote:
> On Sun, Jul 08 2018, Sergio Paracuellos wrote:
>
> > RALINK_PCI_MEMBASE, RALINK_PCI_IOBASE, RALINK_PCI_PCICFG_ADDR and
> > RALINK_PCI_PCIMSK_ADDR are using very ugly pointer arithmetics to
> > read and write al
On Mon, Jul 09, 2018 at 11:08:58AM +1000, NeilBrown wrote:
> On Sun, Jul 08 2018, Sergio Paracuellos wrote:
>
> > This patch series clean up a bit mt7621-pci driver.
> >
> > Changes from v2:
> > - It includes new 17 patches from PATCH 2 to PATCH 18
> >
401 - 500 of 1988 matches
Mail list logo