tools: Update to new sdcard core name.
This commit is contained in:
parent
6693a723d1
commit
c00f61d9d7
|
@ -423,26 +423,26 @@ def generate_dts(d, initrd_start=None, initrd_size=None, initrd=None, root_devic
|
||||||
dts += """
|
dts += """
|
||||||
mmc0: mmc@{mmc_csr_base:x} {{
|
mmc0: mmc@{mmc_csr_base:x} {{
|
||||||
compatible = "litex,mmc";
|
compatible = "litex,mmc";
|
||||||
reg = <0x{sdphy_csr_base:x} 0x100>,
|
reg = <0x{sdcard_phy_csr_base:x} 0x100>,
|
||||||
<0x{sdcore_csr_base:x} 0x100>,
|
<0x{sdcard_core_csr_base:x} 0x100>,
|
||||||
<0x{sdblock2mem:x} 0x100>,
|
<0x{sdcard_block2mem:x} 0x100>,
|
||||||
<0x{sdmem2block:x} 0x100>,
|
<0x{sdcard_mem2block:x} 0x100>,
|
||||||
<0x{sdirq:x} 0x100>;
|
<0x{sdcard_irq:x} 0x100>;
|
||||||
reg-names = "phy", "core", "reader", "writer", "irq";
|
reg-names = "phy", "core", "reader", "writer", "irq";
|
||||||
clocks = <&sys_clk>;
|
clocks = <&sys_clk>;
|
||||||
vmmc-supply = <&vreg_mmc>;
|
vmmc-supply = <&vreg_mmc>;
|
||||||
bus-width = <0x04>;
|
bus-width = <0x04>;
|
||||||
{sdirq_interrupt}
|
{sdcard_irq_interrupt}
|
||||||
status = "okay";
|
status = "okay";
|
||||||
}};
|
}};
|
||||||
""".format(
|
""".format(
|
||||||
mmc_csr_base = d["csr_bases"]["sdphy"],
|
mmc_csr_base = d["csr_bases"]["sdcard_phy"],
|
||||||
sdphy_csr_base = d["csr_bases"]["sdphy"],
|
sdcard_phy_csr_base = d["csr_bases"]["sdcard_phy"],
|
||||||
sdcore_csr_base = d["csr_bases"]["sdcore"],
|
sdcard_core_csr_base = d["csr_bases"]["sdcard_core"],
|
||||||
sdblock2mem = d["csr_bases"]["sdblock2mem"],
|
sdcard_block2mem = d["csr_bases"]["sdcard_block2mem"],
|
||||||
sdmem2block = d["csr_bases"]["sdmem2block"],
|
sdcard_mem2block = d["csr_bases"]["sdcard_mem2block"],
|
||||||
sdirq = d["csr_bases"]["sdirq"],
|
sdcard_irq = d["csr_bases"]["sdcard_irq"],
|
||||||
sdirq_interrupt = "" if polling else "interrupts = <{}>;".format(d["constants"]["sdirq_interrupt"])
|
sdcard_irq_interrupt = "" if polling else "interrupts = <{}>;".format(d["constants"]["sdcard_irq_interrupt"])
|
||||||
)
|
)
|
||||||
# Leds -----------------------------------------------------------------------------------------
|
# Leds -----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -212,33 +212,33 @@ overlay_handlers = {
|
||||||
'alias': 'spi0',
|
'alias': 'spi0',
|
||||||
'config_entry': 'SPI_LITESPI'
|
'config_entry': 'SPI_LITESPI'
|
||||||
},
|
},
|
||||||
'sdblock2mem': {
|
'sdcard_block2mem': {
|
||||||
'handler': peripheral_handler,
|
'handler': peripheral_handler,
|
||||||
'alias': 'sdblock2mem',
|
'alias': 'sdcard_block2mem',
|
||||||
'size': 0x18,
|
'size': 0x18,
|
||||||
'config_entry': 'SD_LITESD'
|
'config_entry': 'SD_LITESD'
|
||||||
},
|
},
|
||||||
'sdcore': {
|
'sdcard_core': {
|
||||||
'handler': peripheral_handler,
|
'handler': peripheral_handler,
|
||||||
'alias': 'sdcore',
|
'alias': 'sdcard_core',
|
||||||
'size': 0x2C,
|
'size': 0x2C,
|
||||||
'config_entry': 'SD_LITESD'
|
'config_entry': 'SD_LITESD'
|
||||||
},
|
},
|
||||||
'sdirq': {
|
'sdcard_irq': {
|
||||||
'handler': peripheral_handler,
|
'handler': peripheral_handler,
|
||||||
'alias': 'sdirq',
|
'alias': 'sdcard_irq',
|
||||||
'size': 0x0C,
|
'size': 0x0C,
|
||||||
'config_entry': 'SD_LITESD'
|
'config_entry': 'SD_LITESD'
|
||||||
},
|
},
|
||||||
'sdmem2block': {
|
'sdcard_mem2block': {
|
||||||
'handler': peripheral_handler,
|
'handler': peripheral_handler,
|
||||||
'alias': 'sdmem2block',
|
'alias': 'sdcard_mem2block',
|
||||||
'size': 0x18,
|
'size': 0x18,
|
||||||
'config_entry': 'SD_LITESD'
|
'config_entry': 'SD_LITESD'
|
||||||
},
|
},
|
||||||
'sdphy': {
|
'sdcard_phy': {
|
||||||
'handler': peripheral_handler,
|
'handler': peripheral_handler,
|
||||||
'alias': 'sdphy',
|
'alias': 'sdcard_phy',
|
||||||
'size': 0x10,
|
'size': 0x10,
|
||||||
'config_entry': 'SD_LITESD'
|
'config_entry': 'SD_LITESD'
|
||||||
},
|
},
|
||||||
|
|
|
@ -420,9 +420,9 @@ def generate_mmc(csr, name, **kwargs):
|
||||||
# FIXME: Get litex to generate CSR region size into output information
|
# FIXME: Get litex to generate CSR region size into output information
|
||||||
# currently only a base address is present
|
# currently only a base address is present
|
||||||
peripheral = get_descriptor(csr, name)
|
peripheral = get_descriptor(csr, name)
|
||||||
core = get_descriptor(csr, 'sdcore', 0x100)
|
core = get_descriptor(csr, 'sdcard_core', 0x100)
|
||||||
reader = get_descriptor(csr, 'sdblock2mem', 0x100)
|
reader = get_descriptor(csr, 'sdcard_block2mem', 0x100)
|
||||||
writer = get_descriptor(csr, 'sdmem2block', 0x100)
|
writer = get_descriptor(csr, 'sdcard_mem2block', 0x100)
|
||||||
|
|
||||||
result = """
|
result = """
|
||||||
mmc_controller: SD.LiteSDCard{} @ {{
|
mmc_controller: SD.LiteSDCard{} @ {{
|
||||||
|
@ -645,7 +645,7 @@ peripherals_handlers = {
|
||||||
'handler': generate_peripheral,
|
'handler': generate_peripheral,
|
||||||
'model': 'I2C.LiteX_I2C'
|
'model': 'I2C.LiteX_I2C'
|
||||||
},
|
},
|
||||||
'sdphy': {
|
'sdcard_phy': {
|
||||||
'handler': generate_mmc,
|
'handler': generate_mmc,
|
||||||
},
|
},
|
||||||
'spisdcard': {
|
'spisdcard': {
|
||||||
|
@ -675,13 +675,13 @@ peripherals_handlers = {
|
||||||
'handler': handled_peripheral # by generate_ethmac
|
'handler': handled_peripheral # by generate_ethmac
|
||||||
},
|
},
|
||||||
# handled by generate_mmc
|
# handled by generate_mmc
|
||||||
'sdblock2mem': {
|
'sdcard_block2mem': {
|
||||||
'handler': handled_peripheral
|
'handler': handled_peripheral
|
||||||
},
|
},
|
||||||
'sdmem2block': {
|
'sdcard_mem2block': {
|
||||||
'handler': handled_peripheral
|
'handler': handled_peripheral
|
||||||
},
|
},
|
||||||
'sdcore': {
|
'sdcard_core': {
|
||||||
'handler': handled_peripheral
|
'handler': handled_peripheral
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue