Lines Matching full:mc

3  * Freescale Management Complex (MC) bus driver
11 #define pr_fmt(fmt) "fsl-mc: " fmt
26 #include "fsl-mc-private.h"
29 * Default DMA mask for devices on a fsl-mc bus
36 * struct fsl_mc - Private data of a "fsl,qoriq-mc" platform device
37 * @root_mc_bus_dev: fsl-mc device representing the root DPRC
52 * @mc_region_type: Type of MC region for the range being translated
53 * @start_mc_offset: Start MC offset of the range being translated
54 * @end_mc_offset: MC offset of the first byte after the range (last MC
77 * @dev: the fsl-mc device to match against
78 * @drv: the device driver to search for matching fsl-mc object type
132 if (add_uevent_var(env, "MODALIAS=fsl-mc:v%08Xd%s", in fsl_mc_bus_uevent()
178 return sprintf(buf, "fsl-mc:v%08Xd%s\n", mc_dev->obj_desc.vendor, in modalias_show()
313 .name = "fsl-mc",
474 * MC bus
510 * MC bus
540 /* send command to mc*/ in mc_get_version()
555 * fsl_mc_get_version - function to retrieve the MC f/w version information
557 * Return: mc version when called after fsl-mc-bus probe; NULL otherwise.
631 struct fsl_mc *mc; in translate_mc_addr() local
634 mc = dev_get_drvdata(root_dprc_dev->parent); in translate_mc_addr()
636 if (mc->num_translation_ranges == 0) { in translate_mc_addr()
644 for (i = 0; i < mc->num_translation_ranges; i++) { in translate_mc_addr()
646 &mc->translation_ranges[i]; in translate_mc_addr()
677 * This function should not have been called for this MC object in fsl_mc_device_get_mmio_regions()
703 * Older MC only returned region offset and no base address in fsl_mc_device_get_mmio_regions()
716 * Some versions of the MC firmware wrongly report in fsl_mc_device_get_mmio_regions()
733 "Invalid MC offset: %#x (for %s.%d\'s region %d)\n", in fsl_mc_device_get_mmio_regions()
740 regions[i].name = "fsl-mc object MMIO region"; in fsl_mc_device_get_mmio_regions()
779 * Add a newly discovered fsl-mc device to be visible in Linux
798 * Allocate an MC bus device object: in fsl_mc_device_add()
837 * parent DPRC's MC portal instead of the child DPRC's MC in fsl_mc_device_add()
842 * given MC object, using the same MC portal. in fsl_mc_device_add()
878 * Get MMIO regions for the device from the MC: in fsl_mc_device_add()
918 * fsl_mc_device_remove - Remove an fsl-mc device from being visible to
921 * @mc_dev: Pointer to an fsl-mc device
970 * yet discovered by the fsl-mc bus, thus the lookup returned NULL. in fsl_mc_get_endpoint()
1012 * 'fsl,qoriq-mc' node. In this case, identity mapping in get_mc_addr_translation_ranges()
1038 * fsl_mc_bus_probe - callback invoked when the root MC bus is being
1045 struct fsl_mc *mc; in fsl_mc_bus_probe() local
1053 mc = devm_kzalloc(&pdev->dev, sizeof(*mc), GFP_KERNEL); in fsl_mc_bus_probe()
1054 if (!mc) in fsl_mc_bus_probe()
1057 platform_set_drvdata(pdev, mc); in fsl_mc_bus_probe()
1061 mc->fsl_mc_regs = devm_ioremap_resource(&pdev->dev, plat_res); in fsl_mc_bus_probe()
1062 if (IS_ERR(mc->fsl_mc_regs)) in fsl_mc_bus_probe()
1063 return PTR_ERR(mc->fsl_mc_regs); in fsl_mc_bus_probe()
1066 if (mc->fsl_mc_regs) { in fsl_mc_bus_probe()
1068 mc_stream_id = readl(mc->fsl_mc_regs + FSL_MC_FAPR); in fsl_mc_bus_probe()
1089 * Some bootloaders pause the MC firmware before booting the in fsl_mc_bus_probe()
1090 * kernel so that MC will not cause faults as soon as the in fsl_mc_bus_probe()
1092 * in place for MC. in fsl_mc_bus_probe()
1093 * At this point MC should have all its SMMU setup done so make in fsl_mc_bus_probe()
1096 writel(readl(mc->fsl_mc_regs + FSL_MC_GCR1) & in fsl_mc_bus_probe()
1098 mc->fsl_mc_regs + FSL_MC_GCR1); in fsl_mc_bus_probe()
1102 * Get physical address of MC portal for the root DPRC: in fsl_mc_bus_probe()
1122 dev_info(&pdev->dev, "MC firmware version: %u.%u.%u\n", in fsl_mc_bus_probe()
1127 &mc->translation_ranges, in fsl_mc_bus_probe()
1128 &mc->num_translation_ranges); in fsl_mc_bus_probe()
1157 mc->root_mc_bus_dev = mc_bus_dev; in fsl_mc_bus_probe()
1167 * fsl_mc_bus_remove - callback invoked when the root MC bus is being
1172 struct fsl_mc *mc = platform_get_drvdata(pdev); in fsl_mc_bus_remove() local
1175 mc_io = mc->root_mc_bus_dev->mc_io; in fsl_mc_bus_remove()
1176 fsl_mc_device_remove(mc->root_mc_bus_dev); in fsl_mc_bus_remove()
1181 if (mc->fsl_mc_regs) { in fsl_mc_bus_remove()
1183 * Pause the MC firmware so that it doesn't crash in certain in fsl_mc_bus_remove()
1186 writel(readl(mc->fsl_mc_regs + FSL_MC_GCR1) | in fsl_mc_bus_remove()
1188 mc->fsl_mc_regs + FSL_MC_GCR1); in fsl_mc_bus_remove()
1193 {.compatible = "fsl,qoriq-mc",},
1240 * Make sure that the MC firmware is paused before the IOMMU setup for in fsl_mc_bus_notifier()