mfd: introduce a driver for LPSS devices on SPT
Subsystems (9)
Andy Shevchenko
reviewerv4 cover mfd: introduce a driver for LPSS devices on SPT
The new coming Intel platforms such as Skylake will contain Sunrisepoint PCH.
The driver is based on MFD framework since the main device, i.e. serial bus controller, contains register space for itself, DMA part, and an additional address space (convergence layer).
The public specification of the register map is avaiable in [1].
This is fourth generation of the patch series to bring support LPSS devices found on Intel Sunrisepoint (Intel Skylake PCH). Previous one can be found here [2].
The series has few logical parts:
- patches 1-3 prepares PM core, ACPI, and driver core (PM) to handle our case
- patches 4-6 introduce unregistering platform devices in MFD in reversed order
- patch 7 implements iDMA 64-bit driver
- patch 8 introduces an MFD driver for LPSS devices
The patch 7 can be applied independently, though it's better if it goes before patch 8.
The patch 8 depends on clkdev_create() helper that has been introduced by Russel King in [3].
The driver has been tested with SPI and UART on Intel Skylake PCH.
[1] https://download.01.org/future-platform-configuration-hub/skylake/register-definitions/332219_001_Final.pdf
[2] http://comments.gmane.org/gmane.linux.power-management.general/60889
[3] https://patchwork.linuxtv.org/patch/28464/
Changelog v4:
- replace patch 3 by Rafael's suggession
- append ACKs from Rafael
- rebase on top of v4.1-rc8
Changelog v3:
- rework patch 3 to be used for all kind of devices (address Alan comment)
- iDMA 64-bit driver improvements:
- fix burst-to-register conversion
- remove excessive locking
- do not expose core part to the user (Kconfig)
- address most of Lee's comments
- append ACKs
- rebase on top of v4.1-rc6
Changelog v2:
- new DMA driver to fully support iDMA 64-bit IP
- patch 3 is added to wake up parent devices when ->probe(), ->remove(), or
->shutdown()
- MFD core is unregistering devices in reversed order
- address few Lee's comments on v1
- address Russel's comment, therefore use clkdev_create() helper
- intel-lpss{,-acpi,-pci} are modified regarding to above changes
Andy Shevchenko (5):
klist: implement klist_prev()
driver core: implement device_for_each_child_reverse()
mfd: make mfd_remove_devices() iterate in reverse order
dmaengine: add a driver for Intel integrated DMA 64-bit
mfd: Add support for Intel Sunrisepoint LPSS devices
Mika Westerberg (2):
PM / QoS: Make it possible to expose device latency tolerance to
userspace
ACPI / PM: Attach ACPI power domain only once
Rafael J. Wysocki (1):
Driver core: wakeup the parent device before trying probe
drivers/acpi/device_pm.c | 8 + drivers/acpi/internal.h | 2 + drivers/acpi/scan.c | 46 ++- drivers/base/core.c | 43 +++ drivers/base/dd.c | 14 + drivers/base/power/power.h | 2 + drivers/base/power/qos.c | 37 +++ drivers/base/power/sysfs.c | 11 + drivers/dma/Kconfig | 5 + drivers/dma/Makefile | 1 + drivers/dma/idma64.c | 724 ++++++++++++++++++++++++++++++++++++++++++ drivers/dma/idma64.h | 232 ++++++++++++++ drivers/mfd/Kconfig | 23 ++ drivers/mfd/Makefile | 3 + drivers/mfd/intel-lpss-acpi.c | 84 +++++ drivers/mfd/intel-lpss-pci.c | 113 +++++++ drivers/mfd/intel-lpss.c | 524 ++++++++++++++++++++++++++++++ drivers/mfd/intel-lpss.h | 62 ++++ drivers/mfd/mfd-core.c | 2 +- include/linux/device.h | 2 + include/linux/klist.h | 1 + include/linux/pm_qos.h | 5 + lib/klist.c | 41 +++ 23 files changed, 1968 insertions(+), 17 deletions(-) create mode 100644 drivers/dma/idma64.c create mode 100644 drivers/dma/idma64.h create mode 100644 drivers/mfd/intel-lpss-acpi.c create mode 100644 drivers/mfd/intel-lpss-pci.c create mode 100644 drivers/mfd/intel-lpss.c create mode 100644 drivers/mfd/intel-lpss.h
Signature · 1 line
2.1.4
Andy Shevchenko
reviewerPATCH v4 1/8 PM / QoS: Make it possible to expose device latency tolerance to userspace
From: Mika Westerberg <[email protected]>
Typically when a device is created the bus core it belongs to (for example PCI) does not know if the device supports things like latency tolerance. This is left to the driver that binds to the device in question. However, at that time the device has already been created and there is no way to set its dev->power.set_latency_tolerance anymore.
So follow what has been done for other PM QoS attributes as well and allow drivers to expose and hide latency tolerance from userspace, if the device supports it.
--- drivers/base/power/power.h | 2 ++ drivers/base/power/qos.c | 37 +++++++++++++++++++++++++++++++++++++ drivers/base/power/sysfs.c | 11 +++++++++++ include/linux/pm_qos.h | 5 +++++ 4 files changed, 55 insertions(+)
drivers/base/power/power.h +2 -0
@@ -33,6 +33,8 @@ extern int pm_qos_sysfs_add_resume_latency(struct device *dev);extern void pm_qos_sysfs_remove_resume_latency (struct device *dev);extern int pm_qos_sysfs_add_flags (struct device *dev);extern void pm_qos_sysfs_remove_flags (struct device *dev); +extern int pm_qos_sysfs_add_latency_tolerance (struct device *dev); +extern void pm_qos_sysfs_remove_latency_tolerance (struct device *dev);#else /* CONFIG_PM */
drivers/base/power/qos.c +37 -0
@@ -883,3 +883,40 @@ int dev_pm_qos_update_user_latency_tolerance(struct device *dev, s32 val)mutex_unlock (&dev_pm_qos_mtx);return ret; } + +/** +* dev_pm_qos_expose_latency_tolerance - Expose latency tolerance to userspace +* @dev: Device whose latency tolerance to expose +*/ +int dev_pm_qos_expose_latency_tolerance (struct device *dev) +{ +int ret; + +if (!dev->power.set_latency_tolerance) +return -EINVAL ; + +mutex_lock (&dev_pm_qos_sysfs_mtx); + ret =pm_qos_sysfs_add_latency_tolerance (dev); +mutex_unlock (&dev_pm_qos_sysfs_mtx); + +return ret; +} +EXPORT_SYMBOL_GPL (dev_pm_qos_expose_latency_tolerance); + +/** +* dev_pm_qos_hide_latency_tolerance - Hide latency tolerance from userspace +* @dev: Device whose latency tolerance to hide +*/ +void dev_pm_qos_hide_latency_tolerance (struct device *dev) +{ +mutex_lock (&dev_pm_qos_sysfs_mtx); +pm_qos_sysfs_remove_latency_tolerance (dev); +mutex_unlock (&dev_pm_qos_sysfs_mtx); + +/* Remove the request from user space now */ +pm_runtime_get_sync (dev); +dev_pm_qos_update_user_latency_tolerance (dev, +PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT ); +pm_runtime_put (dev); +} +EXPORT_SYMBOL_GPL (dev_pm_qos_hide_latency_tolerance);
drivers/base/power/sysfs.c +11 -0
@@ -738,6 +738,17 @@ void pm_qos_sysfs_remove_flags(struct device *dev)sysfs_unmerge_group (&dev->kobj, &pm_qos_flags_attr_group); } +int pm_qos_sysfs_add_latency_tolerance (struct device *dev) +{ +return sysfs_merge_group (&dev->kobj, + &pm_qos_latency_tolerance_attr_group); +} + +void pm_qos_sysfs_remove_latency_tolerance (struct device *dev) +{ +sysfs_unmerge_group (&dev->kobj, &pm_qos_latency_tolerance_attr_group); +} +void rpm_sysfs_remove (struct device *dev) {sysfs_unmerge_group (&dev->kobj, &pm_runtime_attr_group);
include/linux/pm_qos.h +5 -0
@@ -161,6 +161,8 @@ void dev_pm_qos_hide_flags(struct device *dev);int dev_pm_qos_update_flags (struct device *dev,s32 mask,bool set);s32 dev_pm_qos_get_user_latency_tolerance (struct device *dev);int dev_pm_qos_update_user_latency_tolerance (struct device *dev,s32 val); +int dev_pm_qos_expose_latency_tolerance (struct device *dev); +void dev_pm_qos_hide_latency_tolerance (struct device *dev);static inline s32 dev_pm_qos_requested_resume_latency (struct device *dev) {
@@ -229,6 +231,9 @@ static inline s32 dev_pm_qos_get_user_latency_tolerance(struct device *dev) {return PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT ; }static inline int dev_pm_qos_update_user_latency_tolerance (struct device *dev,s32 val) {return 0 ; } +static inline int dev_pm_qos_expose_latency_tolerance (struct device *dev) + {return 0 ; } +static inline void dev_pm_qos_hide_latency_tolerance (struct device *dev) {}static inline s32 dev_pm_qos_requested_resume_latency (struct device *dev) {return 0 ; }static inline s32 dev_pm_qos_requested_flags (struct device *dev) {return 0 ; }
Signature · 1 line
2.1.4
Andy Shevchenko
reviewerPATCH v4 2/8 ACPI / PM: Attach ACPI power domain only once
In reply to Andy ShevchenkoFrom: Mika Westerberg <[email protected]>
Some devices, like MFD subdevices, share a single ACPI companion device so that they are able to access their resources and children. However, currently all these subdevices are attached to the ACPI power domain and this might cause that the power methods for the companion device get called more than once.
In order to solve this we attach the ACPI power domain only to the first physical device that is bound to the ACPI companion device. In case of MFD devices, this is the parent MFD device itself.
--- drivers/acpi/device_pm.c | 8 ++++++++ drivers/acpi/internal.h | 2 ++ drivers/acpi/scan.c | 46 ++++++++++++++++++++++++++++++---------------- 3 files changed, 40 insertions(+), 16 deletions(-)
drivers/acpi/device_pm.c +8 -0
@@ -1103,6 +1103,14 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)if (dev->pm_domain)return -EEXIST ; +/* +* Only attach the power domain to the first device if the +* companion is shared by multiple. This is to prevent doing power +* management twice. +*/ +if (!acpi_device_is_first_physical_node (adev, dev)) +return -EBUSY ; +acpi_add_pm_notifier (adev, dev, acpi_pm_notify_work_func); dev->pm_domain = &acpi_general_pm_domain;if (power_on) {
drivers/acpi/internal.h +2 -0
@@ -96,6 +96,8 @@ void acpi_device_add_finalize(struct acpi_device *device);void acpi_free_pnp_ids (struct acpi_device_pnp *pnp);bool acpi_device_is_present (struct acpi_device *adev);bool acpi_device_is_battery (struct acpi_device *adev); +bool acpi_device_is_first_physical_node (struct acpi_device *adev, +const struct device *dev);/* -------------------------------------------------------------------------- Power Resource
drivers/acpi/scan.c +30 -16
64 lines not on this page · raw message
Signature · 1 line
2.1.4
Andy Shevchenko
reviewerPATCH v4 3/8 Driver core: wakeup the parent device before trying probe
In reply to Andy ShevchenkoFrom: "Rafael J. Wysocki" <[email protected]>
If the parent is still suspended when driver probe is attempted, the result may be failure.
For example, if the parent is a PCI MFD device that has been suspended when we try to probe our device, any register reads will return 0xffffffff.
To fix the problem, making sure the parent is always awake before attempting driver probe.
--- drivers/base/dd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/base/dd.c +14 -0
@@ -399,6 +399,8 @@ EXPORT_SYMBOL_GPL(wait_for_device_probe);* * This function must be called with @dev lock held. When called for a * USB interface, @dev->parent lock must be held as well. +* +* If the device has a parent, runtime-resume the parent before driver probing. */ int driver_probe_device (struct device_driver *drv,struct device *dev) {
@@ -410,10 +412,16 @@ int driver_probe_device(struct device_driver *drv, struct device *dev)pr_debug ("bus: '%s': %s: matched device %s with driver %s\n" , drv->bus->name, __func__,dev_name (dev), drv->name); +if (dev->parent) +pm_runtime_get_sync (dev->parent); +pm_runtime_barrier (dev); ret =really_probe (dev, drv);pm_request_idle (dev); +if (dev->parent) +pm_runtime_put (dev->parent); +return ret; }
@@ -459,8 +467,14 @@ int device_attach(struct device *dev) ret =0 ; } }else { +if (dev->parent) +pm_runtime_get_sync (dev->parent); + ret =bus_for_each_drv (dev->bus,NULL , dev, __device_attach);pm_request_idle (dev); + +if (dev->parent) +pm_runtime_put (dev->parent); } out_unlock:device_unlock (dev);
Signature · 1 line
2.1.4
Rafael J. Wysocki
maintainerRe: [PATCH v4 3/8] Driver core: wakeup the parent device before trying probe
Quoted 9 lines · Andy Shevchenko
From: "Rafael J. Wysocki" <[email protected]>
If the parent is still suspended when driver probe is attempted, the result may be failure.
For example, if the parent is a PCI MFD device that has been suspended when we try to probe our device, any register reads will return
0xffffffff.
Quoted 5 lines
To fix the problem, making sure the parent is always awake before attempting driver probe.
Signed-off-by Heikki Krogerus <[email protected]>Signed-off-by Rafael J. Wysocki <[email protected]>
Please use my Intel sign-off with this one:
Quoted 57 lines
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/base/dd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)drivers/base/dd.c +14
-1@@ -399,6 +399,8 @@ EXPORT_SYMBOL_GPL(wait_for_device_probe);* * This function must be called with @dev lock held. When called for a * USB interface, @dev->parent lock must be held as well. +* +* If the device has a parent, runtime-resume the parent before driver probing. */ int driver_probe_device (struct device_driver *drv,struct device *dev) {@@ -410,10 +412,16 @@ int driver_probe_device(struct device_driver *drv, struct device *dev)pr_debug ("bus: '%s': %s: matched device %s with driver %s\n" , drv->bus->name, __func__,dev_name (dev), drv->name); +if (dev->parent) +pm_runtime_get_sync (dev->parent); +pm_runtime_barrier (dev); ret =really_probe (dev, drv);pm_request_idle (dev); +if (dev->parent) +pm_runtime_put (dev->parent); +return ret; }@@ -459,8 +467,14 @@ int device_attach(struct device *dev) ret =0 ; } }else { +if (dev->parent) +pm_runtime_get_sync (dev->parent); + ret =bus_for_each_drv (dev->bus,NULL , dev, __device_attach);pm_request_idle (dev); + +if (dev->parent) +pm_runtime_put (dev->parent); } out_unlock:device_unlock (dev); --2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Andy Shevchenko
reviewerPATCH v4 4/8 klist: implement klist_prev()
In reply to Andy Shevchenkoklist_prev() gets the previous element in the list. It is useful to traverse through the list in reverse order, for example, to provide LIFO (last in first out) variant of access.
--- include/linux/klist.h | 1 + lib/klist.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+)
include/linux/klist.h +1 -0
@@ -63,6 +63,7 @@ extern void klist_iter_init(struct klist *k, struct klist_iter *i);extern void klist_iter_init_node (struct klist *k,struct klist_iter *i,struct klist_node *n);extern void klist_iter_exit (struct klist_iter *i); +extern struct klist_node *klist_prev (struct klist_iter *i);extern struct klist_node *klist_next (struct klist_iter *i);#endif
lib/klist.c +41 -0
47 lines not on this page · raw message
Signature · 1 line
2.1.4
Andy Shevchenko
reviewerPATCH v4 5/8 driver core: implement device_for_each_child_reverse()
In reply to Andy ShevchenkoThe new function device_for_each_child_reverse() is helpful to traverse the registered devices in a reversed order, e.g. in the case when an operation on each device should be done first on the last added device, then on one before last and so on.
--- drivers/base/core.c | 43 +++++++++++++++++++++++++++++++++++++++++++ include/linux/device.h | 2 ++ 2 files changed, 45 insertions(+)
drivers/base/core.c +43 -0
@@ -1252,6 +1252,19 @@ void device_unregister(struct device *dev) }EXPORT_SYMBOL_GPL (device_unregister); +static struct device *prev_device (struct klist_iter *i) +{ +struct klist_node *n =klist_prev (i); +struct device *dev =NULL ; +struct device_private *p; + +if (n) { + p =to_device_private_parent (n); + dev = p->device; + } +return dev; +} +static struct device *next_device (struct klist_iter *i) {struct klist_node *n =klist_next (i);
@@ -1342,6 +1355,36 @@ int device_for_each_child(struct device *parent, void *data,EXPORT_SYMBOL_GPL (device_for_each_child);/** +* device_for_each_child_reverse - device child iterator in reversed order. +* @parent: parent struct device. +* @fn: function to be called for each device. +* @data: data for the callback. +* +* Iterate over @parent's child devices, and call @fn for each, +* passing it @data. +* +* We check the return of @fn each time. If it returns anything +* other than 0, we break out and return that value. +*/ +int device_for_each_child_reverse (struct device *parent,void *data, +int (*fn)(struct device *dev,void *data)) +{ +struct klist_iter i; +struct device *child; +int error =0 ; + +if (!parent->p) +return 0 ; + +klist_iter_init (&parent->p->klist_children, &i); +while ((child =prev_device (&i)) && !error) + error =fn (child, data); +klist_iter_exit (&i); +return error; +} +EXPORT_SYMBOL_GPL (device_for_each_child_reverse); + +/** * device_find_child - device iterator for locating a particular device. * @parent: parent struct device * @match: Callback function to check device
include/linux/device.h +2 -0
@@ -928,6 +928,8 @@ extern int __must_check device_add(struct device *dev);extern void device_del (struct device *dev);extern int device_for_each_child (struct device *dev,void *data,int (*fn)(struct device *dev,void *data)); +extern int device_for_each_child_reverse (struct device *dev,void *data, +int (*fn)(struct device *dev,void *data));extern struct device *device_find_child (struct device *dev,void *data,int (*match)(struct device *dev,void *data));extern int device_rename (struct device *dev,const char *new_name);
Signature · 1 line
2.1.4
Andy Shevchenko
reviewerPATCH v4 6/8 mfd: make mfd_remove_devices() iterate in reverse order
In reply to Andy ShevchenkoThe newly introduced device_for_each_child_reverse() would be used when MFD core removes the device.
After this patch applied the devices will be removed in a reversed order. This behaviour is useful when devices have implicit dependency on order, i.e. consider MFD device with serial bus controller, such as SPI, and DMA IP that is attached to serial bus controller: before remove the DMA driver we have to be ensured that no DMA transfers is ongoing and the requested channel are unused.
--- drivers/mfd/mfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/mfd-core.c +1 -1
@@ -300,7 +300,7 @@ void mfd_remove_devices(struct device *parent) {atomic_t *cnts =NULL ; -device_for_each_child (parent, &cnts, mfd_remove_devices_fn); +device_for_each_child_reverse (parent, &cnts, mfd_remove_devices_fn);kfree (cnts); }EXPORT_SYMBOL (mfd_remove_devices);
Signature · 1 line
2.1.4
Lee Jones
AppliedRe: [PATCH v4 6/8] mfd: make mfd_remove_devices() iterate in reverse order
Quoted 9 lines · Andy Shevchenko
The newly introduced
device_for_each_child_reverse()would be used when MFD core removes the device.After this patch applied the devices will be removed in a reversed order. This behaviour is useful when devices have implicit dependency on order, i.e. consider MFD device with serial bus controller, such as SPI, and DMA IP that is attached to serial bus controller: before remove the DMA driver we have to be ensured that no DMA transfers is ongoing and the requested channel are unused.
Quoted 4 lines
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/mfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Quoted 13 lines
drivers/mfd/mfd-core.c +1
-1@@ -300,7 +300,7 @@ void mfd_remove_devices(struct device *parent) {atomic_t *cnts =NULL ; -device_for_each_child (parent, &cnts, mfd_remove_devices_fn); +device_for_each_child_reverse (parent, &cnts, mfd_remove_devices_fn);kfree (cnts); }EXPORT_SYMBOL (mfd_remove_devices);
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Andy Shevchenko
reviewerRe: [PATCH v4 6/8] mfd: make mfd_remove_devices() iterate in reverse order
Quoted 17 lines · Lee Jones
Quoted 15 lines · Andy Shevchenko
The newly introduced
device_for_each_child_reverse()would be used when MFD
core removes the device.After this patch applied the devices will be removed in a reversed order. This
behaviour is useful when devices have implicit dependency on order, i.e.
consider MFD device with serial bus controller, such as SPI, and DMA IP that is
attached to serial bus controller: before remove the DMA driver we have to be
ensured that no DMA transfers is ongoing and the requested channel are unused.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/mfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Applied, thanks.
Hmm… Seems kinda mistake. I can't see this applied (and required previous patches 4 and 5) to any of your branch neither in (today's) linux-next.
Quoted 17 lines
Quoted 16 lines
drivers/mfd/mfd-core.c +1
-1@@ -300,7 +300,7 @@ void mfd_remove_devices(struct device *parent) {atomic_t *cnts =NULL ; -device_for_each_child (parent, &cnts, mfd_remove_devices_fn); +device_for_each_child_reverse (parent, &cnts, mfd_remove_devices_fn);kfree (cnts);}
EXPORT_SYMBOL(mfd_remove_devices);
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Re: [PATCH v4 6/8] mfd: make mfd_remove_devices() iterate in reverse order
Quoted 23 lines · Andy Shevchenko
Quoted 22 lines · Lee Jones
Quoted 19 lines · Andy Shevchenko
The newly introduced
device_for_each_child_reverse()would be used when MFD
core removes the device.After this patch applied the devices will be removed in a reversed order. This
behaviour is useful when devices have implicit dependency on order, i.e.
consider MFD device with serial bus controller, such as SPI, and DMA IP that is
attached to serial bus controller: before remove the DMA driver we have to be
ensured that no DMA transfers is ongoing and the requested channel are unused.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/mfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 5 lines
Quoted 1 line
Applied, thanks.
Hmm… Seems kinda mistake. I can't see this applied (and required previous patches 4 and 5) to any of your branch neither in (today's) linux-next.
New stuff applied after v4.1 couldn't show up in -next before v4.2-rc1 was released (which just happened last night)?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Andy Shevchenko
reviewerRe: [PATCH v4 6/8] mfd: make mfd_remove_devices() iterate in reverse order
Quoted 34 lines · Geert Uytterhoeven
Quoted 32 lines · Andy Shevchenko
Quoted 30 lines · Lee Jones
Quoted 21 lines · Andy Shevchenko
The newly introduced
device_for_each_child_reverse()would be used
when MFD
core removes the device.After this patch applied the devices will be removed in a reversed
order. This
behaviour is useful when devices have implicit dependency on order,
i.e.
consider MFD device with serial bus controller, such as SPI, and
DMA IP that is
attached to serial bus controller: before remove the DMA driver we
have to be
ensured that no DMA transfers is ongoing and the requested channel
are unused.Quoted 5 lines
Signed-off-by: Andy Shevchenko <
[email protected]>--- drivers/mfd/mfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Applied, thanks.
Quoted 8 lines
Quoted 4 lines
Hmm… Seems kinda mistake. I can't see this applied (and required previous patches 4 and 5) to any of your branch neither in (today's)
linux-next.New stuff applied after v4.1 couldn't show up in -next before v4.2 -rc1 was
released (which just happened last night)?
Might be, I would like to resend new version of my series and that's why I would like to have a branch to check what is already applied. So, if I can't see it does it mean it is brewed in the private repository?
Signature · 6 lines
Andy Shevchenko <[email protected]> Intel Finland Oy -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 6/8] mfd: make mfd_remove_devices() iterate in reverse order
Quoted 40 lines · Andy Shevchenko
Quoted 39 lines · Geert Uytterhoeven
Quoted 36 lines · Andy Shevchenko
Quoted 23 lines · Lee Jones
Quoted 21 lines · Andy Shevchenko
The newly introduced
device_for_each_child_reverse()would be used
when MFD
core removes the device.After this patch applied the devices will be removed in a reversed
order. This
behaviour is useful when devices have implicit dependency on order,
i.e.
consider MFD device with serial bus controller, such as SPI, and
DMA IP that is
attached to serial bus controller: before remove the DMA driver we
have to be
ensured that no DMA transfers is ongoing and the requested channel
are unused.Quoted 7 lines
Quoted 5 lines
Signed-off-by: Andy Shevchenko <
[email protected]>--- drivers/mfd/mfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Applied, thanks.
Hmm… Seems kinda mistake. I can't see this applied (and required previous patches 4 and 5) to any of your branch neither in (today's)
linux-next.
Quoted 7 lines
Quoted 3 lines
New stuff applied after v4.1 couldn't show up in -next before v4.2 -rc1 was
released (which just happened last night)?Might be, I would like to resend new version of my series and that's why I would like to have a branch to check what is already applied. So, if I can't see it does it mean it is brewed in the private repository?
If you have patches that depend on this, they either need to come through my tree, or you have to wait until the next kernel version (which you probably don't want, right?).
The alternative is that I unapply this patch and the whole lot can be sucked up by the most appropriate subsystem.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v4 6/8] mfd: make mfd_remove_devices() iterate in reverse order
Quoted 7 lines · Lee Jones
Quoted 5 lines · Andy Shevchenko
Quoted 4 lines · Geert Uytterhoeven
Quoted 2 lines · Andy Shevchenko
Quoted 1 line · Lee Jones
On Mon, 15 Jun 2015, Andy Shevchenko wrote:
[]
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
Applied, thanks.
Hmm… Seems kinda mistake. I can't see this applied (and required previous patches 4 and 5) to any of your branch neither in (today's)
linux-next.Quoted 7 lines
Quoted 3 lines
New stuff applied after v4.1 couldn't show up in -next before v4.2 -rc1 was
released (which just happened last night)?Might be, I would like to resend new version of my series and that's why I would like to have a branch to check what is already applied. So, if I can't see it does it mean it is brewed in the private repository?
Quoted 6 lines
If you have patches that depend on this, they either need to come through my tree, or you have to wait until the next kernel version (which you probably don't want, right?).
The alternative is that I unapply this patch and the whole lot can be sucked up by the most appropriate subsystem.
I resent a new version for other comments(still with all patches included). Meanwhile the patches 4-6 (from v4 or v5, where they are the same) could be applied in the first place. Can you clarify what exactly you have applied? The idea is to put the rest via your subsystem since it's most appropriate for this series.
Signature · 6 lines
With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 6/8] mfd: make mfd_remove_devices() iterate in reverse order
Quoted 30 lines · Andy Shevchenko
Quoted 7 lines · Lee Jones
Quoted 5 lines · Andy Shevchenko
Quoted 4 lines · Geert Uytterhoeven
Quoted 2 lines · Andy Shevchenko
Quoted 1 line · Lee Jones
On Mon, 15 Jun 2015, Andy Shevchenko wrote:
[]
Quoted 19 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
Applied, thanks.
Hmm… Seems kinda mistake. I can't see this applied (and required previous patches 4 and 5) to any of your branch neither in (today's)
linux-next.Quoted 7 lines
Quoted 3 lines
New stuff applied after v4.1 couldn't show up in -next before v4.2 -rc1 was
released (which just happened last night)?Might be, I would like to resend new version of my series and that's why I would like to have a branch to check what is already applied. So, if I can't see it does it mean it is brewed in the private repository?
If you have patches that depend on this, they either need to come through my tree, or you have to wait until the next kernel version (which you probably don't want, right?).
Quoted 8 lines
Quoted 2 lines
The alternative is that I unapply this patch and the whole lot can be sucked up by the most appropriate subsystem.
I resent a new version for other comments(still with all patches included). Meanwhile the patches 4-6 (from v4 or v5, where they are the same) could be applied in the first place. Can you clarify what exactly you have applied? The idea is to put the rest via your subsystem since it's most appropriate for this series.
Easiest thing for me to do is unapply.
We can take the whole series when all the Acks have been accrued.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v4 6/8] mfd: make mfd_remove_devices() iterate in reverse order
Quoted 41 lines · Lee Jones
Quoted 30 lines · Andy Shevchenko
Quoted 7 lines · Lee Jones
Quoted 5 lines · Andy Shevchenko
Quoted 4 lines · Geert Uytterhoeven
Quoted 2 lines · Andy Shevchenko
Quoted 1 line · Lee Jones
On Mon, 15 Jun 2015, Andy Shevchenko wrote:
[]
Quoted 19 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
Applied, thanks.
Hmm… Seems kinda mistake. I can't see this applied (and required previous patches 4 and 5) to any of your branch neither in (today's)
linux-next.Quoted 7 lines
Quoted 3 lines
New stuff applied after v4.1 couldn't show up in -next before v4.2 -rc1 was
released (which just happened last night)?Might be, I would like to resend new version of my series and that's why I would like to have a branch to check what is already applied. So, if I can't see it does it mean it is brewed in the private repository?
If you have patches that depend on this, they either need to come through my tree, or you have to wait until the next kernel version (which you probably don't want, right?).
Quoted 8 lines
Quoted 2 lines
The alternative is that I unapply this patch and the whole lot can be sucked up by the most appropriate subsystem.
I resent a new version for other comments(still with all patches included). Meanwhile the patches 4-6 (from v4 or v5, where they are the same) could be applied in the first place. Can you clarify what exactly you have applied? The idea is to put the rest via your subsystem since it's most appropriate for this series.
Quoted 3 lines
Easiest thing for me to do is unapply.
We can take the whole series when all the Acks have been accrued.
So are there any ACKs missing from the last series posted by Andy?
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 6/8] mfd: make mfd_remove_devices() iterate in reverse order
Quoted 42 lines · Rafael J. Wysocki
Quoted 41 lines · Lee Jones
Quoted 38 lines · Andy Shevchenko
Quoted 7 lines · Lee Jones
Quoted 5 lines · Andy Shevchenko
Quoted 4 lines · Geert Uytterhoeven
Quoted 2 lines · Andy Shevchenko
Quoted 1 line · Lee Jones
On Mon, 15 Jun 2015, Andy Shevchenko wrote:
[]
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
Applied, thanks.
Hmm… Seems kinda mistake. I can't see this applied (and required previous patches 4 and 5) to any of your branch neither in (today's)
linux-next.Quoted 7 lines
Quoted 3 lines
New stuff applied after v4.1 couldn't show up in -next before v4.2 -rc1 was
released (which just happened last night)?Might be, I would like to resend new version of my series and that's why I would like to have a branch to check what is already applied. So, if I can't see it does it mean it is brewed in the private repository?
Quoted 6 lines
If you have patches that depend on this, they either need to come through my tree, or you have to wait until the next kernel version (which you probably don't want, right?).
The alternative is that I unapply this patch and the whole lot can be sucked up by the most appropriate subsystem.
I resent a new version for other comments(still with all patches included). Meanwhile the patches 4-6 (from v4 or v5, where they are the same) could be applied in the first place. Can you clarify what exactly you have applied? The idea is to put the rest via your subsystem since it's most appropriate for this series.
Quoted 5 lines
Quoted 3 lines
Easiest thing for me to do is unapply.
We can take the whole series when all the Acks have been accrued.
So are there any ACKs missing from the last series posted by Andy?
Yes, I have requested a Clk Ack, as there are some, lets say interesting code in the MFD driver which I am unsure about. However, we have caught Mike at an awkward time, as he is in the middle of transitioning jobs.
Perhaps Stephen Boyd (now Cc'ed) might have a look.
Signature · 8 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 6/8] mfd: make mfd_remove_devices() iterate in reverse order
Quoted 9 lines · Lee Jones
Quoted 1 line · Rafael J. Wysocki
So are there any ACKs missing from the last series posted by Andy?
Yes, I have requested a Clk Ack, as there are some, lets say interesting code in the MFD driver which I am unsure about. However, we have caught Mike at an awkward time, as he is in the middle of transitioning jobs.
Perhaps Stephen Boyd (now Cc'ed) might have a look.
Context? I found the cover letter.
clkdev is maintained by Russell. You could get his ack for the usage of the clkdev_create() API, but I'm not sure why it's needed. The API was merged into Linus' tree so I think you have everything you need.
$ git tag -l --contains 2568999835d7797afce3dcc3a3f368051ffcaf1f v4* v4.2-rc1
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v4 6/8] mfd: make mfd_remove_devices() iterate in reverse order
Quoted 11 lines · Stephen Boyd
Quoted 9 lines · Lee Jones
Quoted 1 line · Rafael J. Wysocki
So are there any ACKs missing from the last series posted by Andy?
Yes, I have requested a Clk Ack, as there are some, lets say interesting code in the MFD driver which I am unsure about. However, we have caught Mike at an awkward time, as he is in the middle of transitioning jobs.
Perhaps Stephen Boyd (now Cc'ed) might have a look.
Quoted 8 lines
Context? I found the cover letter.
clkdev is maintained by Russell. You could get his ack for the usage of the
clkdev_create()API, but I'm not sure why it's needed. The API was merged into Linus' tree so I think you have everything you need.$ git tag -l --contains 2568999835d7797afce3dcc3a3f368051ffcaf1f v4* v4.2-rc1
mfd: Add support for Intel Sunrisepoint LPSS devices
I also just bounced the original patch submission to you. I'm particularly concerned with the use of IDA to match clocks by name.
Signature · 8 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Andy Shevchenko
reviewerPATCH v4 7/8 dmaengine: add a driver for Intel integrated DMA 64-bit
In reply to Andy ShevchenkoIntel integrated DMA (iDMA) 64-bit is a specific IP that is used as a part of LPSS devices such as HSUART or SPI. The iDMA IP is attached for private usage on each host controller independently.
While it has similarities with Synopsys DesignWare DMA, the following distinctions doesn't allow to use the existing driver:
- 64-bit mode with corresponding changes in Hardware Linked List data structure
- many slight differences in the channel registers
Moreover this driver is based on the DMA virtual channels framework that helps to make the driver cleaner and easy to understand.
--- drivers/dma/Kconfig | 5 + drivers/dma/Makefile | 1 + drivers/dma/idma64.c | 724 +++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/dma/idma64.h | 232 +++++++++++++++++ 4 files changed, 962 insertions(+) create mode 100644 drivers/dma/idma64.c create mode 100644 drivers/dma/idma64.h
drivers/dma/Kconfig +5 -0
@@ -85,6 +85,11 @@ config INTEL_IOP_ADMA help Enable support for the Intel(R) IOP Series RAID engines. +config IDMA64 + tristate "Intel integrated DMA 64-bit support" + select DMA_ENGINE + select DMA_VIRTUAL_CHANNELS + source "drivers/dma/dw/Kconfig" config AT_HDMAC
drivers/dma/Makefile +1 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_HSU_DMA) += hsu/ obj-$(CONFIG_MPC512X_DMA) += mpc512x_dma.o obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/ obj-$(CONFIG_MV_XOR) += mv_xor.o +obj-$(CONFIG_IDMA64) += idma64.o obj-$(CONFIG_DW_DMAC_CORE) += dw/ obj-$(CONFIG_AT_HDMAC) += at_hdmac.o obj-$(CONFIG_AT_XDMAC) += at_xdmac.o
drivers/dma/idma64.c new file +724 -0
724 lines not on this page · raw message
drivers/dma/idma64.h new file +232 -0
232 lines not on this page · raw message
Signature · 1 line
2.1.4
Andy Shevchenko
reviewerPATCH v4 8/8 mfd: Add support for Intel Sunrisepoint LPSS devices
In reply to Andy ShevchenkoThe new coming Intel platforms such as Skylake will contain Sunrisepoint PCH. The main difference to the previous platforms is that the LPSS devices are compound devices where usually main (SPI, HSUART, or I2C) and DMA IPs are present.
This patch brings the driver for such devices found on Sunrisepoint PCH.
--- drivers/mfd/Kconfig | 23 ++ drivers/mfd/Makefile | 3 + drivers/mfd/intel-lpss-acpi.c | 84 +++++++ drivers/mfd/intel-lpss-pci.c | 113 +++++++++ drivers/mfd/intel-lpss.c | 524 ++++++++++++++++++++++++++++++++++++++++++ drivers/mfd/intel-lpss.h | 62 +++++ 6 files changed, 809 insertions(+) create mode 100644 drivers/mfd/intel-lpss-acpi.c create mode 100644 drivers/mfd/intel-lpss-pci.c create mode 100644 drivers/mfd/intel-lpss.c create mode 100644 drivers/mfd/intel-lpss.h
drivers/mfd/Kconfig +23 -0
@@ -325,6 +325,29 @@ config INTEL_SOC_PMIC thermal, charger and related power management functions on these systems. +config MFD_INTEL_LPSS + tristate + select COMMON_CLK + select MFD_CORE + +config MFD_INTEL_LPSS_ACPI + tristate "Intel Low Power Subsystem support in ACPI mode" + select MFD_INTEL_LPSS + depends on X86 && ACPI + help + This driver supports Intel Low Power Subsystem (LPSS) devices such as + I2C, SPI and HS-UART starting from Intel Sunrisepoint (Intel Skylake + PCH) in ACPI mode. + +config MFD_INTEL_LPSS_PCI + tristate "Intel Low Power Subsystem support in PCI mode" + select MFD_INTEL_LPSS + depends on X86 && PCI + help + This driver supports Intel Low Power Subsystem (LPSS) devices such as + I2C, SPI and HS-UART starting from Intel Sunrisepoint (Intel Skylake + PCH) in PCI mode. + config MFD_INTEL_MSIC bool "Intel MSIC" depends on INTEL_SCU_IPC
drivers/mfd/Makefile +3 -0
@@ -161,6 +161,9 @@ obj-$(CONFIG_TPS65911_COMPARATOR) += tps65911-comparator.o obj-$(CONFIG_MFD_TPS65090) += tps65090.o obj-$(CONFIG_MFD_AAT2870_CORE) += aat2870-core.o obj-$(CONFIG_MFD_ATMEL_HLCDC) += atmel-hlcdc.o +obj-$(CONFIG_MFD_INTEL_LPSS) += intel-lpss.o +obj-$(CONFIG_MFD_INTEL_LPSS_PCI) += intel-lpss-pci.o +obj-$(CONFIG_MFD_INTEL_LPSS_ACPI) += intel-lpss-acpi.o obj-$(CONFIG_MFD_INTEL_MSIC) += intel_msic.o obj-$(CONFIG_MFD_PALMAS) += palmas.o obj-$(CONFIG_MFD_VIPERBOARD) += viperboard.o
drivers/mfd/intel-lpss-acpi.c new file +84 -0
84 lines not on this page · raw message
drivers/mfd/intel-lpss-pci.c new file +113 -0
113 lines not on this page · raw message
drivers/mfd/intel-lpss.c new file +524 -0
524 lines not on this page · raw message
drivers/mfd/intel-lpss.h new file +62 -0
62 lines not on this page · raw message
Signature · 1 line
2.1.4