@@ -32,12 +32,15 @@ def prepare(module, options):
3232 if did ["family" ] in ["f0" ] and did ["name" ] in ["91" , "98" ]:
3333 return False
3434
35- if not (did ["family" ] in ["l4" ] \
36- or did ["family" ] in ["f0" ] and did ["name" ] in ["42" , "72" ] \
37- or did ["family" ] in ["f3" ] and did ["name" ] in ["03" ] \
35+ # Enable DMA only for some devices...
36+ if not ( \
37+ (did ["family" ] in ["l4" ]) \
38+ or (did ["family" ] in ["f0" ] and did ["name" ] not in ["30" , "70" , "71" , "72" , "78" ]) \
39+ or (did ["family" ] in ["f3" ] and did ["name" ] not in ["73" , "78" ]) \
3840 ):
3941 return False
4042
43+
4144 module .depends (":cmsis:device" , ":platform:rcc" )
4245
4346 return True
@@ -72,10 +75,9 @@ def build(env):
7275 controller .append ({"instance" : int (channels ["instance" ]), "channels" : int (max_channels )})
7376
7477 did = device .identifier
75- if did .family in ['f0' ]:
76- if (did .name == '30' and did .size == 'c' ):
77- print ("FIXME: Bug in modm-deviced data: Dma2 does not exist on " + str (device .identifier ))
78- properties ["dma" ]["instance" ].remove ('2' )
78+ if (did .family in ['f0' ] and did .name == '30' and did .size == 'c' ) or (did .family in ['f1' ] and did .name == '02' ):
79+ print ("FIXME: Bug in modm-deviced data: Dma2 does not exist on " + str (device .identifier ))
80+ properties ["dma" ]["instance" ].remove ('2' )
7981
8082 signal_names = sorted (list (set (signal_names )))
8183 properties ["dmaType" ] = dma ["type" ]
@@ -85,7 +87,7 @@ def build(env):
8587 properties ["irqList" ] = dict ()
8688 for channels in dma ["channels" ]:
8789 irqs = [v ["name" ] for v in device .get_driver ("core" )["vector" ]]
88- irqs = [v for v in irqs if v .startswith ("DMA" + channels ["instance" ])]
90+ irqs = [v for v in irqs if v .startswith ("DMA" + channels ["instance" ]) and not "DMA2D" in v ]
8991 irq_list = list ()
9092 for irq in irqs :
9193 irq_channel_list = []
0 commit comments