Skip to contentSkip to conversation

MABC RTNet driver to work with GEM hardware

PATCH Jan Kiszka 1 participant 1 message Oct 2, 2019 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): b7f-5d94bd80-57-344a2840@235462188

Jan Kiszka

author
#1 lore raw

Please keep this on the list - readding.

Quoted 11 lines · François Legal
Quoted 6 lines · Jan Kiszka
Quoted 5 lines · François Legal via Xenomai

From: François LEGAL <[email protected]>

Make MACB driver compliant with GEM hardware (as mainline linux driver does). Main fix is about interrupt flag that is never cleared (write 1 to clear)

Do you mean I shall move these 3 lines right before "kernel/drivers/net/drivers/Kconfig | 7 +++++++..." ?

I mean something like this in your git commit:

"Make MACB driver compliant with GEM hardware

Main fix is about interrupt flag that is never
cleared (write 1 to clear)

Signed-off-by ..."

That will generate a properly formatted e-mail when send that out.

Quoted 63 lines
Quoted 40 lines
Quoted 4 lines

Subject: [PATCH] Make MACB driver compliant with GEM hardware

Hmm, two subject lines - which one should I use? Would be better get the first one right already ;).

Quoted 32 lines
---
   kernel/drivers/net/drivers/Kconfig  |  7 +++++++
   kernel/drivers/net/drivers/Makefile |  1 +
   kernel/drivers/net/drivers/macb.c   | 23 ++++++++++++++++++++---
   3 files changed, 28 insertions(+), 3 deletions(-)
kernel/drivers/net/drivers/Kconfig +7 -0
index 65f0855..39c976f 100644
@@ -131,6 +131,13 @@ config XENO_DRIVERS_NET_DRV_MACB
       Driver for internal MAC-controller on AT91SAM926x microcontrollers.
       Porting by Cristiano Mantovani and Stefano Banzi (Marposs SpA).
 
+config XENO_DRIVERS_NET_DRV_GEM
+    depends on XENO_DRIVERS_NET
+    tristate "GEM devices"
+    ---help---
+    Driver for internal MAC-controller on Zynq 7000 SoCs.
+    Porting by Cristiano Mantovani and Stefano Banzi (Marposs SpA).
+
   endif
 
   source "drivers/xenomai/net/drivers/experimental/Kconfig"
kernel/drivers/net/drivers/Makefile +0 -0
index d95c5a8..9da1a56 100644
@@ -57,6 +57,7 @@ obj-$(CONFIG_XENO_DRIVERS_NET_DRV_SMC91111) += rt_smc91111.o
   rt_smc91111-y := smc91111.o
 
Quoted 5 lines

kernel/drivers/net/drivers/Makefile obj-$(CONFIG_XENO_DRIVERS_NET_DRV_SMC91111) += rt_smc91111.o · line 60

Quoted 2 lines
kernel/drivers/net/drivers/Makefile +1 -0
   obj-$(CONFIG_XENO_DRIVERS_NET_DRV_MACB) += rt_macb.o
+obj-$(CONFIG_XENO_DRIVERS_NET_DRV_GEM) += rt_macb.o

Only saw this now: What's the idea behind adding XENO_DRIVERS_NET_DRV_GEM when there is XENO_DRIVERS_NET_DRV_MACB already? If a selects both, the build will fail.

Yes, that's correct. However, the Kconfig selects automatically some AT91 specific stuff when CONFIG_XENO_DRIVERS_NET_DRV_MACB is selected. I'm not sure on the best way to handle those situations without breaking the existing function.

from Kconfig :
config XENO_DRIVERS_NET_DRV_AT91_ETHER
depends on XENO_DRIVERS_NET && SOC_AT91RM9200 select XENO_DRIVERS_NET_DRV_MACB tristate "AT91RM9200 Board Ethernet Driver"

config XENO_DRIVERS_NET_DRV_MACB
depends on XENO_DRIVERS_NET && ARCH_AT91
select AT91_PROGRAMMABLE_CLOCKS
tristate "MACB devices"
---help---
Driver for internal MAC-controller on AT91SAM926x microcontrollers. Porting by Cristiano Mantovani and Stefano Banzi (Marposs SpA).

Quoted 4 lines

Maybe I should replace the line select AT91_PROGRAMMABLE_CLOCKS with select AT91_PROGRAMMABLE_CLOCKS IF ARCH_AT91

What do you think ?

What does upstream do? Maybe we copied back than a suboptimal pattern that was improved there meanwhile.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux