Driver changes for ti-sysc for v5.15
Few ti-sysc changes to handle quirk for McASP SIDLE mode, correct documentation for sysc_ioremap(), and start using pm_runtime_resume_and_get(). -----BEGIN PGP SIGNATURE----- iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAmELpDARHHRvbnlAYXRv bWlkZS5jb20ACgkQG9Q+yVyrpXPPzA//ZRy3FD+o8jS79w8yTrN2lzZqYzU3ioFr 5Uxp8pDvJG8toH8esBPtx0RxhnG11wnd3EKXlPrLnhJtvuzyS+J0LYCHKcWcCNR8 ptbDSeIVoaRzidfz7VRISSimpJ9zCo8p87ExxqgBTQrchj0e8g7pv0Z8bNZEzpAX JeCLQeWrcYpHEOytvkf6VCs0w0xqZcUq2AZR8xVtHMFcHy/Y4A+bk/LnrM70GLZ8 Z2dGfPqAS5zAgb67nMrmsJ9cdCALQJrSD65lnKt4c9RJJeUKDCNgwdmHz0qBfyIr ZhKwEtCwZkL//N0oTFId4kymniJelqHvJcx8bgxso6zYFb6CBtzEGU6+84SlF5JM 1htt0mPh7l/JZkUT1fFYhE0GU56xh0RNXTSJyS8o1vkAozjZ3j6e7cKBuG4ANUBf VHSO65PFLh9m/wD1rT7xp0OxYZBn6Cczbg+zuexUtCEYLUjKBxDgGcEMAnbhjJIU F5faisvSVgZt4EZ5bKfRX70suhB7KW4aadItAuiG6SrJYjtBt7aao9Z6SOdI2jsQ jevhUr0cJwv+j7L3t/VCon2sfzgVOBljmQjCSq3huMGndOC7pdPi5pMQ3LMlAQlM az8I5g7wtwXDPl0W2AbNjFRP3VU/HMx9vf6C//V3vhYcvJojBPqXYc0AaH6WxqXs +ZPx4Vbgkbs= =4Uzo -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmEVhT4ACgkQmmx57+YA GNkJXQ/+P+ZayMHYjrG1GFNvlKvor7D4aweXGIXaV2zMj2JGjW2wduioP1iK3JUf kZRTEx9mX+0iwZYxfBp8e1O9R8iSPCrHWy0zPF8qHM6ppILG395/x/9YNXMBnM9a AX/Aon5Z3PHoD5QIQVXN9t4KWwcAGIpb4KP/9/1wIhzUsnOy+XByx/dNfmm/5YNo 2UL6ihutZpeikRqIi0sf5xbilK/Re1NFlWSl2Q2aamZ2VOniNNhUBiekiuo2r3A7 QiE3MIjEjy9t/QGTMDEVLUR3wxvBCRbZZguKMpdfDPGREU/csKxjQUNlW7YoJAxV FxVglgZFbsi6Ycaf00qoLxh42cnCZ7OSwKz4W9CK077ldgPjlFcxP2A/RNgwEmF5 LXh/ctd8SQ+WVRlQPIx8PxBbC3mhKZ8uF+m2FjxbQro0au5F6gLQSo339X6Q2jjK cGD/I8Hros0s+fkUtUa3SzQuQ2SLS3khTH4O1oaFkeRZ+Mtfem5OBT2lusGkIudy jaZ4z8IaFe7/XajIXRT+QPsE7pjFJA3aov+m18zwHwOvONtYmeQTevJhex93XspA bdvbVkBUVTrIYQcLia0NFLu7dohUBmgZz4khhbTyL2l9JiFHFuFB6heC1+ykNJVz vlIxXqBxt0shZfm4Vum6VnHceSdDiqhkQLRBknT6bggnvs3M0lo= =fPmH -----END PGP SIGNATURE----- Merge tag 'omap-for-v5.15/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/drivers Driver changes for ti-sysc for v5.15 Few ti-sysc changes to handle quirk for McASP SIDLE mode, correct documentation for sysc_ioremap(), and start using pm_runtime_resume_and_get(). * tag 'omap-for-v5.15/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Add quirk for OMAP4 McASP to disable SIDLE mode bus: ti-sysc: using pm_runtime_resume_and_get instead of pm_runtime_get_sync bus: ti-sysc: Correct misdocumentation of 'sysc_ioremap()' bus: ti-sysc: Fix gpt12 system timer issue with reserved status Link: https://lore.kernel.org/r/pull-1628153040-834155@atomide.com-2 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
9c8300b160
@ -100,6 +100,7 @@ static const char * const clock_names[SYSC_MAX_CLOCKS] = {
|
||||
* @cookie: data used by legacy platform callbacks
|
||||
* @name: name if available
|
||||
* @revision: interconnect target module revision
|
||||
* @reserved: target module is reserved and already in use
|
||||
* @enabled: sysc runtime enabled status
|
||||
* @needs_resume: runtime resume needed on resume from suspend
|
||||
* @child_needs_resume: runtime resume needed for child on resume from suspend
|
||||
@ -130,6 +131,7 @@ struct sysc {
|
||||
struct ti_sysc_cookie cookie;
|
||||
const char *name;
|
||||
u32 revision;
|
||||
unsigned int reserved:1;
|
||||
unsigned int enabled:1;
|
||||
unsigned int needs_resume:1;
|
||||
unsigned int child_needs_resume:1;
|
||||
@ -853,7 +855,7 @@ static int sysc_check_registers(struct sysc *ddata)
|
||||
}
|
||||
|
||||
/**
|
||||
* syc_ioremap - ioremap register space for the interconnect target module
|
||||
* sysc_ioremap - ioremap register space for the interconnect target module
|
||||
* @ddata: device driver data
|
||||
*
|
||||
* Note that the interconnect target module registers can be anywhere
|
||||
@ -1499,6 +1501,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
|
||||
SYSC_MODULE_QUIRK_SGX),
|
||||
SYSC_QUIRK("lcdc", 0, 0, 0x54, -ENODEV, 0x4f201000, 0xffffffff,
|
||||
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
|
||||
SYSC_QUIRK("mcasp", 0, 0, 0x4, -ENODEV, 0x44306302, 0xffffffff,
|
||||
SYSC_QUIRK_SWSUP_SIDLE),
|
||||
SYSC_QUIRK("rtc", 0, 0x74, 0x78, -ENODEV, 0x4eb01908, 0xffff00f0,
|
||||
SYSC_MODULE_QUIRK_RTC_UNLOCK),
|
||||
SYSC_QUIRK("tptc", 0, 0, 0x10, -ENODEV, 0x40006c00, 0xffffefff,
|
||||
@ -1555,7 +1559,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
|
||||
SYSC_QUIRK("hsi", 0, 0, 0x10, 0x14, 0x50043101, 0xffffffff, 0),
|
||||
SYSC_QUIRK("iss", 0, 0, 0x10, -ENODEV, 0x40000101, 0xffffffff, 0),
|
||||
SYSC_QUIRK("keypad", 0x4a31c000, 0, 0x10, 0x14, 0x00000020, 0xffffffff, 0),
|
||||
SYSC_QUIRK("mcasp", 0, 0, 0x4, -ENODEV, 0x44306302, 0xffffffff, 0),
|
||||
SYSC_QUIRK("mcasp", 0, 0, 0x4, -ENODEV, 0x44307b02, 0xffffffff, 0),
|
||||
SYSC_QUIRK("mcbsp", 0, -ENODEV, 0x8c, -ENODEV, 0, 0, 0),
|
||||
SYSC_QUIRK("mcspi", 0, 0, 0x10, -ENODEV, 0x40300a0b, 0xffff00ff, 0),
|
||||
@ -3093,8 +3096,8 @@ static int sysc_probe(struct platform_device *pdev)
|
||||
return error;
|
||||
|
||||
error = sysc_check_active_timer(ddata);
|
||||
if (error)
|
||||
return error;
|
||||
if (error == -EBUSY)
|
||||
ddata->reserved = true;
|
||||
|
||||
error = sysc_get_clocks(ddata);
|
||||
if (error)
|
||||
@ -3109,9 +3112,8 @@ static int sysc_probe(struct platform_device *pdev)
|
||||
goto unprepare;
|
||||
|
||||
pm_runtime_enable(ddata->dev);
|
||||
error = pm_runtime_get_sync(ddata->dev);
|
||||
error = pm_runtime_resume_and_get(ddata->dev);
|
||||
if (error < 0) {
|
||||
pm_runtime_put_noidle(ddata->dev);
|
||||
pm_runtime_disable(ddata->dev);
|
||||
goto unprepare;
|
||||
}
|
||||
@ -3130,11 +3132,15 @@ static int sysc_probe(struct platform_device *pdev)
|
||||
sysc_show_registers(ddata);
|
||||
|
||||
ddata->dev->type = &sysc_device_type;
|
||||
error = of_platform_populate(ddata->dev->of_node, sysc_match_table,
|
||||
|
||||
if (!ddata->reserved) {
|
||||
error = of_platform_populate(ddata->dev->of_node,
|
||||
sysc_match_table,
|
||||
pdata ? pdata->auxdata : NULL,
|
||||
ddata->dev);
|
||||
if (error)
|
||||
goto err;
|
||||
}
|
||||
|
||||
INIT_DELAYED_WORK(&ddata->idle_work, ti_sysc_idle);
|
||||
|
||||
@ -3165,9 +3171,8 @@ static int sysc_remove(struct platform_device *pdev)
|
||||
|
||||
cancel_delayed_work_sync(&ddata->idle_work);
|
||||
|
||||
error = pm_runtime_get_sync(ddata->dev);
|
||||
error = pm_runtime_resume_and_get(ddata->dev);
|
||||
if (error < 0) {
|
||||
pm_runtime_put_noidle(ddata->dev);
|
||||
pm_runtime_disable(ddata->dev);
|
||||
goto unprepare;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user