Lines Matching +full:uart +full:- +full:16550 +full:- +full:compatible
1 // SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/clk-provider.h>
15 #include <linux/platform_data/clk-fch.h>
23 * struct apd_device_desc - a descriptor for apd device
26 * @properties: build-in properties of the device such as UART
48 const struct apd_device_desc *dev_desc = pdata->dev_desc; in acpi_apd_setup()
51 if (dev_desc->fixed_clk_rate) { in acpi_apd_setup()
52 clk = clk_register_fixed_rate(&pdata->adev->dev, in acpi_apd_setup()
53 dev_name(&pdata->adev->dev), in acpi_apd_setup()
54 NULL, 0, dev_desc->fixed_clk_rate); in acpi_apd_setup()
55 clk_register_clkdev(clk, NULL, dev_name(&pdata->adev->dev)); in acpi_apd_setup()
56 pdata->clk = clk; in acpi_apd_setup()
66 struct acpi_device *adev = pdata->adev; in fch_misc_setup()
74 clk_data = devm_kzalloc(&adev->dev, sizeof(*clk_data), GFP_KERNEL); in fch_misc_setup()
76 return -ENOMEM; in fch_misc_setup()
81 return -ENOENT; in fch_misc_setup()
83 if (!acpi_dev_get_property(adev, "clk-name", ACPI_TYPE_STRING, &obj)) { in fch_misc_setup()
84 clk_data->name = devm_kzalloc(&adev->dev, obj->string.length, in fch_misc_setup()
86 if (!clk_data->name) in fch_misc_setup()
87 return -ENOMEM; in fch_misc_setup()
89 strcpy(clk_data->name, obj->string.pointer); in fch_misc_setup()
92 clk_data->name = "mclk"; in fch_misc_setup()
96 clk_data->base = devm_ioremap(&adev->dev, rentry->res->start, in fch_misc_setup()
97 resource_size(rentry->res)); in fch_misc_setup()
100 if (!clk_data->base) in fch_misc_setup()
101 return -ENOMEM; in fch_misc_setup()
105 clkdev = platform_device_register_data(&adev->dev, "clk-fch", in fch_misc_setup()
122 PROPERTY_ENTRY_U32("reg-io-width", 4),
123 PROPERTY_ENTRY_U32("reg-shift", 2),
124 PROPERTY_ENTRY_BOOL("snps,uart-16550-compatible"),
190 const struct apd_device_desc *dev_desc = (void *)id->driver_data; in acpi_apd_create_device()
202 return -ENOMEM; in acpi_apd_create_device()
204 pdata->adev = adev; in acpi_apd_create_device()
205 pdata->dev_desc = dev_desc; in acpi_apd_create_device()
207 if (dev_desc->setup) { in acpi_apd_create_device()
208 ret = dev_desc->setup(pdata); in acpi_apd_create_device()
213 adev->driver_data = pdata; in acpi_apd_create_device()
214 pdev = acpi_create_platform_device(adev, dev_desc->properties); in acpi_apd_create_device()
219 adev->driver_data = NULL; in acpi_apd_create_device()