- 25 Oct, 2012 2 commits
-
-
H Hartley Sweeten authored
The functions cb_pcidda_ai_cmd(), cb_pcidda_ai_cmdtest(), and cb_pcidda_ns_to_timer() are all partially coded stubs for command support with the analog output subdevice. Just remove the code since it is #if 0'ed out. It can be added back later if command support is completed. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
As pointed out by Fengguang Wu, the error test after finding the boardinfo should be testing for (!thisboard). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 24 Oct, 2012 38 commits
-
-
Ian Abbott authored
Update the prompt line and description for the COMEDI_AMPLC_DIO200_PCI config option to add the new PCIe boards supported by the "amplc_dio200" driver. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Change the `insn_read` and `insn_write` handlers of the '8254' counter subdevices to support reading and writing multiple data values. (Writing multiple values isn't very useful, but if that's what the user wants....) Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Add clock source constants for the timer subdevice of the PCIe cards supported by the "amplc_dio200" driver. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Implement the timer subdevice for the new PCIe boards. The subdevice was previously marked as unused, but was reserved for this purpose. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
These are currently unused but will be used to support extra features of the PCIe boards. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Add constants to "comedi.h" for the extra clock and gate sources allowed by the new PCIe cards supported by the "amplc_dio200" driver. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
One of the enhancements of the new PCIe boards is the addition of extra clock and gate sources. Allow clock and gate sources up to 31 for these boards (compared to 7 for the old boards) although most of those are reserved for future use. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
The new PCIe boards PCIe215, PCIe236 and PCIe296 have some enhanced features (over the older boards), although none of these features are supported by this driver yet. Enable the enhanced features in hardware and use `dio200_layouts[]` to indicate which boards support the enhanced features. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
The new PCIe boards PCIe215, PCIe236 and PCIe296 need a special register setting to allow generation of interrupts on the PCIe bus. Add `dio200_pcie_board_setup()` to do this and call it from `dio200_attach_pci()` for those boards. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Add preliminary support for the above PCIe boards. The interrupt subdevice is not working yet as the boards need some additional initialization to enable interrupts. Reserve an unused subdevice that will eventually become a timer subdevice. Some unused subdevices have been added between the used subdevices on the PCIe215 and PCIe236. This is so the subdevice numbers will match a pattern-matching feature to be added at a later date, where the pattern-match specifications for a subdevice include pattern-match results from other subdevices, specified by index. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Add `mainshift` member to `struct dio200_board` to hold the amount of left-shift required for main register offsets. This is 0 for all the boards currently supported so it doesn't need initializing explicitly in any current element of `dio200_boards[]`. It will be non-zero for some new boards to be supported by this driver. Modify the register access functions `dio200_read8()` and `dio200_write8()` to take the shift into account. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Store the length of the main register region in new member `mainsize` of `struct dio200_board` and initialize it in each element of `dio200_boards[]`. For all currently supported boards this is initialized to `DIO200_IO_SIZE` (0x20), but will be different for newer boards to be supported in the future. For ISA boards, this is the actual region length requested, but for PCI boards it's the minimum expected region length. Verify that the PCI BAR region length is sufficient in `dio200_attach_pci()`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Add `mainbar` member to `struct dio200_board` to hold the PCI BAR number for the main registers. This is `2` for the PCI boards currently supported (PCI215 and PCI272) but will be different for some new boards to be supported later. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
The boards currently supported by this module all use port I/O. Support memory-mapped I/O as well for future PCI/PCIe cards. Define `struct dio200_region` to hold the type of register access and either the port I/O base address or an ioremapped MMIO address. Add a member `io` to the comedi device private data (`struct dio200_private`) to hold this. Use this instead of `dev->iobase`. Memory-mapped registers are mapped in `dio200_pci_attach()` and unmapped in `dio200_detach()`. `dio200_detach()` now uses the private data pointer `devpriv` set to `dev->private` but can return early if it is `NULL` because no clean-up needs to be done in that case. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Don't pass the I/O base address to `dio200_common_attach()`. The only thing it does with it is set `dev->iobase` to the passed in value. Do that before calling `dio200_common_attach()` in order to simplify upcoming support for different register access methods. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Add custom functions to access hardware registers and call them instead of calling `inb()` and `outb()` directly. When additional cards are supported by this driver requiring different register access methods, the new functions will localize the register access differences to just these functions. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
The "amplc_dio200" module no longer depends on the "8255" module, so the 'COMEDI_AMPLC_DIO200' Kconfig setting no longer needs to select 'COMEDI_8255'. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Implement the '8255' DIO subdevice internally to this module instead of using the external "8255" module. I plan to add support for additional cards to this driver that would require the I/O callback functionality of the 8255 module, but the existing callback functions do not have much context to handle this elegantly. The additional cards also have extra DIO features which cannot be handled by the existing "8255" module and that I'd like to support some time in the future. The bottom line is I _could_ continue using the "8255" module for a while with a callback function, but it would turn out to be a very ugly callback function and I'd have to ditch the use of the "8255" module as soon as I added an extra feature to the DIO subdevice. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Add our own functions to manipulate the '8254' counter chip instead of the inline ones from "8253.h". This will make the code less messy when we add code to support new boards later. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Replace the absolute, modified I/O base addresses in the private data structures for the '8254' counter and 'intr' DIO subdevices with offsets from the main I/O base address. `dio200_subdev_intr_init()` now needs the offset instead of the absolute address. `dio200_subdev_8254_init()` now only needs the offset instead of both the absolute address and the offset. The '8255' DIO subdevices are unaffected as they are handled by the external "8255" module. This change is not useful by itself but is an intermediate step for later changes. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
The `has_clk_gat_sce` member of `struct dio200_subdev_8254` indicates whether the board has clock and gate source selection registers. The same information can be obtained from read-only board layout data so doesn't need to be set per '8254' counter subdevice. Eliminate the member and use the read-only data instead. The last parameter of `dio200_subdev_8254_init()` is used to initialize this member, so remove that parameter as well. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Add inline helper function `dio200_board_layout(board)` to get a pointer to the board layout data for a board. Add inline helper function `dio200_dev_layout(dev)` to get a pointer to the board layout data for a comedi device (this function is currently unused but will be used by a later change). Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Now that the tag name `dio200_layout` is available, rename `struct dio200_layout_struct` to `struct dio200_layout` as the `_struct` suffix is a bit redundant and I plan to use this type in other places in the module. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Rename `enum dio200_layout` to `enum dio200_layout_idx`. It's only used once and frees up the `dio200_layout` tag for something else later. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Rename the clock and gate configuration functions for the '8254' counter subdevices and pass in the pointers to the comedi device and comedi subdevice. This is just preparing the way for later changes. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Absorb `dio200_pci_common_attach()` into `dio200_attach_pci()` since that's the only place it is called from. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
The call to `comedi_set_hw_dev()` from `dio200_pci_common_attach()` is now unnecessary since `dio200_pci_common_attach()` is now only called from this driver's `attach_pci` hook `dio200_attach_pci()` and the comedi core now calls `comedi_set_hw_dev()` before calling that. Remove the unnecessary call. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Now that this driver no longer supports "manual" attachment of PCI devices in its `attach` hook (`dio200_attach()`), it no longer has code that searches for a suitable PCI device and increments its reference count. Since the driver no longer has any reason for incrementing and decrementing the PCI device's reference count, the calls to `pci_dev_get()` and `pci_dev_put()` can be removed. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Remove the code that allows PCI boards to be manually attached by the `COMEDI_DEVCONFIG` ioctl (or the "comedi_config" application). Supported PCI boards will be attached automatically at probe time via `comedi_pci_auto_config()` and the `attach_pci` hook in the `struct comedi_driver`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Reformat the driver description comment to use the preferred block comment style so that future changes are acceptable to the checkpatch.pl script. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Devendra Naga authored
remove some of the function prototypes , they dont have a definition of the function Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Devendra Naga authored
remove CsrTime typedef and replace all the users with the u32 Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
YAMANE Toshiaki authored
fixed below checkpatch warnings. - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... - WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... and added pr_fmt. Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
YAMANE Toshiaki authored
fixed below checkpatch warnings. - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... - WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... and added pr_fmt. Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
YAMANE Toshiaki authored
fixed below checkpatch warning. - Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
YAMANE Toshiaki authored
fixed below checkpatch warning. - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... - WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ... and add pr_fmt. Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
YAMANE Toshiaki authored
fixed below checkpatch warning. - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
SeongJae Park authored
CsrThreadHandle is typedef of struct CsrThread. Some functions in csr_framework_ext.h use it as parameter. But, nobody call them. Signed-off-by: SeongJae Park <sj38.park@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-