Message ID | 1529516435-7315-8-git-send-email-jollys@xilinx.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Quoting Jolly Shah (2018-06-20 10:40:32) > From: Rajan Vaja <rajanv@xilinx.com> > > Add debugfs file to set/get IOCTL using debugfs interface. IOCTLs and debugfs aren't the same thing. Why are the two being mixed together? Is some sort of userspace ABI being created here to control clks with usermode drivers? -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
SGkgU3RlcGhlbiwNCg0KVGhhbmtzIGZvciB0aGUgcmV2aWV3LA0KDQo+IC0tLS0tT3JpZ2luYWwg TWVzc2FnZS0tLS0tDQo+IEZyb206IFN0ZXBoZW4gQm95ZCBbbWFpbHRvOnNib3lkQGtlcm5lbC5v cmddDQo+IFNlbnQ6IFN1bmRheSwgSnVseSAwOCwgMjAxOCAxMDoyOSBQTQ0KPiBUbzogSm9sbHkg U2hhaCA8Sk9MTFlTQHhpbGlueC5jb20+OyBhcmQuYmllc2hldXZlbEBsaW5hcm8ub3JnOw0KPiBk bWl0cnkudG9yb2tob3ZAZ21haWwuY29tOyBncmVna2hAbGludXhmb3VuZGF0aW9uLm9yZzsNCj4g aGthbGx3ZWl0MUBnbWFpbC5jb207IGtlZXNjb29rQGNocm9taXVtLm9yZzsgbGludXgtY2xrQHZn ZXIua2VybmVsLm9yZzsNCj4gbWFyay5ydXRsYW5kQGFybS5jb207IG1hdHRAY29kZWJsdWVwcmlu dC5jby51azsgTWljaGFsIFNpbWVrDQo+IDxtaWNoYWxzQHhpbGlueC5jb20+OyBtaW5nb0BrZXJu ZWwub3JnOyBtdHVycXVldHRlQGJheWxpYnJlLmNvbTsNCj4gcm9iaCtkdEBrZXJuZWwub3JnOyBz Ym95ZEBjb2RlYXVyb3JhLm9yZzsgc3VkZWVwLmhvbGxhQGFybS5jb20NCj4gQ2M6IFJhamFuIFZh amEgPFJBSkFOVkB4aWxpbnguY29tPjsgbGludXgtYXJtLWtlcm5lbEBsaXN0cy5pbmZyYWRlYWQu b3JnOw0KPiBsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnOyBkZXZpY2V0cmVlQHZnZXIua2Vy bmVsLm9yZzsgSm9sbHkgU2hhaA0KPiA8Sk9MTFlTQHhpbGlueC5jb20+DQo+IFN1YmplY3Q6IFJl OiBbUEFUQ0ggdjkgMDcvMTBdIGZpcm13YXJlOiB4aWxpbng6IEFkZCBkZWJ1Z2ZzIGZvciBJT0NU TCBBUEkNCj4gDQo+IFF1b3RpbmcgSm9sbHkgU2hhaCAoMjAxOC0wNi0yMCAxMDo0MDozMikNCj4g PiBGcm9tOiBSYWphbiBWYWphIDxyYWphbnZAeGlsaW54LmNvbT4NCj4gPg0KPiA+IEFkZCBkZWJ1 Z2ZzIGZpbGUgdG8gc2V0L2dldCBJT0NUTCB1c2luZyBkZWJ1Z2ZzIGludGVyZmFjZS4NCj4gDQo+ IElPQ1RMcyBhbmQgZGVidWdmcyBhcmVuJ3QgdGhlIHNhbWUgdGhpbmcuIFdoeSBhcmUgdGhlIHR3 byBiZWluZyBtaXhlZA0KPiB0b2dldGhlcj8gSXMgc29tZSBzb3J0IG9mIHVzZXJzcGFjZSBBQkkg YmVpbmcgY3JlYXRlZCBoZXJlIHRvIGNvbnRyb2wgY2xrcyB3aXRoDQo+IHVzZXJtb2RlIGRyaXZl cnM/DQoNClRoaXMgaXMgbm90IHN0YW5kYXJkIGlvY3RsLiBUaGlzIGlzIHR5cGUgb2YgWnlucU1Q IEFQSSBqdXN0IGxpa2Ugb3RoZXIgQVBJcy4gVGhpcyBkZWJ1Z2ZzIGlzIGNyZWF0ZWQgdG8gZGVi dWcgWnlucU1QIElPQ1RMIEFQSS4NCg0KVGhhbmtzLA0KSm9sbHkgU2hhaA0K -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/firmware/xilinx/zynqmp-debug.c b/drivers/firmware/xilinx/zynqmp-debug.c index 4800366..148dbff 100644 --- a/drivers/firmware/xilinx/zynqmp-debug.c +++ b/drivers/firmware/xilinx/zynqmp-debug.c @@ -32,6 +32,7 @@ static char debugfs_buf[PAGE_SIZE]; #define PM_API(id) {id, #id, strlen(#id)} static struct pm_api_info pm_api_list[] = { PM_API(PM_GET_API_VERSION), + PM_API(PM_IOCTL), }; /** @@ -95,6 +96,15 @@ static int process_api_request(u32 pm_id, u64 *pm_api_arg, u32 *pm_api_ret) sprintf(debugfs_buf, "PM-API Version = %d.%d\n", pm_api_version >> 16, pm_api_version & 0xffff); break; + case PM_IOCTL: + ret = eemi_ops->ioctl(pm_api_arg[0], pm_api_arg[1], + pm_api_arg[2], pm_api_arg[3], + &pm_api_ret[0]); + if (!ret && (pm_api_arg[1] == IOCTL_GET_PLL_FRAC_MODE || + pm_api_arg[1] == IOCTL_GET_PLL_FRAC_DATA)) + sprintf(debugfs_buf, "IOCTL return value: %u\n", + pm_api_ret[1]); + break; default: sprintf(debugfs_buf, "Unsupported PM-API request\n"); ret = -EINVAL;