Commit Graph

6 Commits

Author SHA1 Message Date
Michal Sojka 270579d95f uio_mf624: Align memory regions to page size and set correct offsets
mf624 card has its registers not aligned to pages. Since commit
b655028795 ("uio: we cannot mmap unaligned page contents") mmap()ing
mf624 registers fails, because now the uio drivers must set
uio_mem->addr to be page-aligned.

We align the address here and set the newly introduced offs field to
the offset of the mf264 registers within the page so that userspace
can find the address of the mmap()ed register by reading
/sys/class/uio/uio?/maps/map?/offset.

Tested with real mf624 card.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 18:13:28 +02:00
Michal Sojka a15d2ddba9 uio_mf624: Refactor memory info initialization
No functional changes. Move initialization of struct uio_mem to a
function. This will allow the next commit to change the initialization
code at a single place rather that at three different places.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 18:13:28 +02:00
Jingoo Han 0f4054df0b uio: uio_mf624: remove DEFINE_PCI_DEVICE_TABLE macro
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08 22:41:48 -08:00
Jingoo Han 1129308885 uio: uio_mf624: remove unnecessary pci_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 08:47:25 -07:00
Fengguang Wu 497b46dbc6 drivers: uio: mf624_disable_interrupt() can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Rostislav Lisovy <lisovy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 08:45:42 -07:00
Rostislav Lisovy 06849faab5 drivers: uio: Add driver for Humusoft MF624 DAQ PCI card
Signed-off-by: Rostislav Lisovy <lisovy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-30 12:12:49 -07:00