json2dts_zephyr: omit disable handler

omit disable handler for the sdcard peripherals,
as they still don't have a driver in zephyr and are not in the board dts.

This way the build in zephyr will not fail.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
Fin Maaß 2024-08-20 11:13:26 +02:00
parent afc66fd5cf
commit c1403db407
No known key found for this signature in database
1 changed files with 12 additions and 3 deletions

View File

@ -273,26 +273,31 @@ overlay_handlers = {
'handler': peripheral_handler, 'handler': peripheral_handler,
'alias': 'sdcard_block2mem', 'alias': 'sdcard_block2mem',
'size': 0x18, 'size': 0x18,
'disable_handler': False,
}, },
'sdcard_core': { 'sdcard_core': {
'handler': peripheral_handler, 'handler': peripheral_handler,
'alias': 'sdcard_core', 'alias': 'sdcard_core',
'size': 0x2C, 'size': 0x2C,
'disable_handler': False,
}, },
'sdcard_irq': { 'sdcard_irq': {
'handler': peripheral_handler, 'handler': peripheral_handler,
'alias': 'sdcard_irq', 'alias': 'sdcard_irq',
'size': 0x0C, 'size': 0x0C,
'disable_handler': False,
}, },
'sdcard_mem2block': { 'sdcard_mem2block': {
'handler': peripheral_handler, 'handler': peripheral_handler,
'alias': 'sdcard_mem2block', 'alias': 'sdcard_mem2block',
'size': 0x18, 'size': 0x18,
'disable_handler': False,
}, },
'sdcard_phy': { 'sdcard_phy': {
'handler': peripheral_handler, 'handler': peripheral_handler,
'alias': 'sdcard_phy', 'alias': 'sdcard_phy',
'size': 0x10, 'size': 0x10,
'disable_handler': False,
}, },
'i2c0' : { 'i2c0' : {
'handler': i2c_handler, 'handler': i2c_handler,
@ -333,10 +338,14 @@ def generate_dts_config(csr):
try: try:
dtsi += parm['handler'](name, parm, csr) dtsi += parm['handler'](name, parm, csr)
except KeyError as e: except KeyError as e:
print(' dtsi key', e, 'not found, disable', name)
enable = 'n' enable = 'n'
dtsi += disabled_handler(name, parm, csr) if parm.get('disable_handler', True):
print(' dtsi key', e, 'not found, disable', name)
dtsi += disabled_handler(name, parm, csr)
else:
print(' dtsi key', e, 'not found, skip', name)
continue
dtsi += dts_close() dtsi += dts_close()
dts += dtsi dts += dtsi
if 'config_entry' in parm: if 'config_entry' in parm: