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()
179 return sprintf(buf, "fsl-mc:v%08Xd%s\n", mc_dev->obj_desc.vendor, in modalias_show()
314 .name = "fsl-mc",
475 * MC bus
511 * MC bus
541 /* send command to mc*/ in mc_get_version()
556 * fsl_mc_get_version - function to retrieve the MC f/w version information
558 * Return: mc version when called after fsl-mc-bus probe; NULL otherwise.
632 struct fsl_mc *mc; in translate_mc_addr() local
635 mc = dev_get_drvdata(root_dprc_dev->parent); in translate_mc_addr()
637 if (mc->num_translation_ranges == 0) { in translate_mc_addr()
645 for (i = 0; i < mc->num_translation_ranges; i++) { in translate_mc_addr()
647 &mc->translation_ranges[i]; in translate_mc_addr()
678 * This function should not have been called for this MC object in fsl_mc_device_get_mmio_regions()
704 * Older MC only returned region offset and no base address in fsl_mc_device_get_mmio_regions()
717 * Some versions of the MC firmware wrongly report in fsl_mc_device_get_mmio_regions()
734 "Invalid MC offset: %#x (for %s.%d\'s region %d)\n", in fsl_mc_device_get_mmio_regions()
741 regions[i].name = "fsl-mc object MMIO region"; in fsl_mc_device_get_mmio_regions()
780 * Add a newly discovered fsl-mc device to be visible in Linux
799 * Allocate an MC bus device object: in fsl_mc_device_add()
838 * parent DPRC's MC portal instead of the child DPRC's MC in fsl_mc_device_add()
843 * given MC object, using the same MC portal. in fsl_mc_device_add()
879 * Get MMIO regions for the device from the MC: in fsl_mc_device_add()
919 * fsl_mc_device_remove - Remove an fsl-mc device from being visible to
922 * @mc_dev: Pointer to an fsl-mc device
971 * yet discovered by the fsl-mc bus, thus the lookup returned NULL. in fsl_mc_get_endpoint()
1013 * 'fsl,qoriq-mc' node. In this case, identity mapping in get_mc_addr_translation_ranges()
1039 * fsl_mc_bus_probe - callback invoked when the root MC bus is being
1046 struct fsl_mc *mc; in fsl_mc_bus_probe() local
1054 mc = devm_kzalloc(&pdev->dev, sizeof(*mc), GFP_KERNEL); in fsl_mc_bus_probe()
1055 if (!mc) in fsl_mc_bus_probe()
1058 platform_set_drvdata(pdev, mc); in fsl_mc_bus_probe()
1062 mc->fsl_mc_regs = devm_ioremap_resource(&pdev->dev, plat_res); in fsl_mc_bus_probe()
1063 if (IS_ERR(mc->fsl_mc_regs)) in fsl_mc_bus_probe()
1064 return PTR_ERR(mc->fsl_mc_regs); in fsl_mc_bus_probe()
1067 if (mc->fsl_mc_regs) { in fsl_mc_bus_probe()
1069 mc_stream_id = readl(mc->fsl_mc_regs + FSL_MC_FAPR); in fsl_mc_bus_probe()
1090 * Some bootloaders pause the MC firmware before booting the in fsl_mc_bus_probe()
1091 * kernel so that MC will not cause faults as soon as the in fsl_mc_bus_probe()
1093 * in place for MC. in fsl_mc_bus_probe()
1094 * At this point MC should have all its SMMU setup done so make in fsl_mc_bus_probe()
1097 writel(readl(mc->fsl_mc_regs + FSL_MC_GCR1) & in fsl_mc_bus_probe()
1099 mc->fsl_mc_regs + FSL_MC_GCR1); in fsl_mc_bus_probe()
1103 * Get physical address of MC portal for the root DPRC: in fsl_mc_bus_probe()
1123 dev_info(&pdev->dev, "MC firmware version: %u.%u.%u\n", in fsl_mc_bus_probe()
1128 &mc->translation_ranges, in fsl_mc_bus_probe()
1129 &mc->num_translation_ranges); in fsl_mc_bus_probe()
1158 mc->root_mc_bus_dev = mc_bus_dev; in fsl_mc_bus_probe()
1168 * fsl_mc_bus_remove - callback invoked when the root MC bus is being
1173 struct fsl_mc *mc = platform_get_drvdata(pdev); in fsl_mc_bus_remove() local
1176 mc_io = mc->root_mc_bus_dev->mc_io; in fsl_mc_bus_remove()
1177 fsl_mc_device_remove(mc->root_mc_bus_dev); in fsl_mc_bus_remove()
1182 if (mc->fsl_mc_regs) { in fsl_mc_bus_remove()
1184 * Pause the MC firmware so that it doesn't crash in certain in fsl_mc_bus_remove()
1187 writel(readl(mc->fsl_mc_regs + FSL_MC_GCR1) | in fsl_mc_bus_remove()
1189 mc->fsl_mc_regs + FSL_MC_GCR1); in fsl_mc_bus_remove()
1194 {.compatible = "fsl,qoriq-mc",},
1241 * Make sure that the MC firmware is paused before the IOMMU setup for in fsl_mc_bus_notifier()