Jens Taprogge
7db5e3cb91
Staging: ipack: Move device ids from ipoctal.c to ipack_ids.h.
...
Rename them in the process.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org >
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 15:13:51 -07:00
Jens Taprogge
e8ed3276c2
Staging: ipack: Parse vendor and device id.
...
Also expose the values through sysfs.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org >
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 15:13:51 -07:00
Jens Taprogge
187e478240
Staging: ipack: Read the ID space during device registration.
...
We keep a copy of the ID space for later use.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org >
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 15:13:51 -07:00
Jens Taprogge
849e0ad257
Staging: ipack: implement ipack device table.
...
The modaliases look like ipack:fXvNdM, where X is the format version (8
bit) and N and M are the vendor and device ID represented as 32 bit
hexadecimal numbers each. Using 32 bits allows us to define IPACK_ANY_ID
as (~0) without interfering with the valid ids.
The resulting modalias string for ipoctal.ko looks like this (once
ipoctal provides a device table):
alias: ipack:f01v000000F0d00000048*
alias: ipack:f01v000000F0d0000002A*
alias: ipack:f01v000000F0d00000022*
(output from modinfo)
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org >
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:43:26 -07:00
Jens Taprogge
1f43d7bfac
Staging: ipack/devices/ipoctal: Tidy up ipoctal some more.
...
No need to have a struct when it has only one field.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org >
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:41:11 -07:00
Jens Taprogge
a498899a3e
Staging: ipack/devices/ipoctal: ipoctal cleanups.
...
Define memory address space, fix sparse warnings and mark the structs
reflecting hardware memory layout "packed" to be on the safe side.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org >
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:41:11 -07:00
Samuel Iglesias Gonsálvez
564bbf9b4a
Staging: ipack: remove read/write operations from ipack_bus_ops
...
They are not used any longer.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org >
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:39:54 -07:00
Jens Taprogge
b2e93e94d0
Staging: ipack/bridges/tpci200: Remove the read/write functions from ipack_bus_ops.
...
They are not used any longer.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org >
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:39:54 -07:00
Jens Taprogge
64802dc8ed
Staging: ipack/devices/ipoctal: Convert ipoctal to directly use ioread/write functions.
...
Before it was using the functions in ipack_bus_ops.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org >
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:39:54 -07:00
Jens Taprogge
cea2f7cdff
Staging: ipack/bridges/tpci200: Use the TPCI200 in big endian mode.
...
During initialization we configure the TPCI200 so it does not swap data
lanes on IndustryPack module access. The read and write functions are
changed accordingly.
We are taking this approach in the hope that all IP Carriers are able to
present the Module memory layout unchanged. We can thus directly access
the memory and registers of IP Modules without having to rely on the
read and write wrappers currently exposed in ipack_bus_opts. A later
patch will convert the existing driver and remove the wrappers.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org >
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:39:54 -07:00
Jens Taprogge
5e15a753cd
Staging: ipack/bridges/tpci200: Reorganize tpci200_probe in preparation for functional changes.
...
These changes make it easier to add more initialization steps later on.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org >
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:39:54 -07:00
Devendra Naga
7cd4e8c577
staging: csr: replace calls to kmalloc and memset with kzalloc
...
the kzalloc does allocates memory and sets the data at the memory
which is allocated to 0,
The driver does uses the kmalloc and memset at some points in the code
replace them with a single call to kzalloc
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com >
Acked-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:35:05 -07:00
Devendra Naga
6f6ed3db33
staging: csr: remove casting of return value from kmalloc
...
as per Documentation/CodingStyle, casting of void pointer to
any other pointer is not needed
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com >
Acked-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:35:05 -07:00
Priit Laes
34f86d06f0
staging: csr: Remove all leftover kernel version checks \o/
...
Signed-off-by: Priit Laes <plaes@plaes.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:33:52 -07:00
Priit Laes
4febd649bb
staging: csr: Remove unneeded UF_NETIF_TX_* macros
...
Signed-off-by: Priit Laes <plaes@plaes.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:31:21 -07:00
Priit Laes
59e6201d38
staging: csr: unifi_priv.h: Remove KERNEL_VERSION checks
...
Signed-off-by: Priit Laes <plaes@plaes.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:31:21 -07:00
Priit Laes
457d404c0a
staging: csr: unifi_wext.h: Remove KERNEL_VERSION checks
...
Signed-off-by: Priit Laes <plaes@plaes.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:31:21 -07:00
Priit Laes
b5008ae237
staging: csr: drv.c: Remove KERNEL_VERSION checks and associated defines
...
Signed-off-by: Priit Laes <plaes@plaes.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:31:21 -07:00
Priit Laes
6e9950a62b
staging: csr: Drop unused UNIFI_NET_NAME configuration option
...
Signed-off-by: Priit Laes <plaes@plaes.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:31:21 -07:00
Priit Laes
6e5e4043bc
staging: csr: remove unused define ALLOW_Q_PAUSE
...
Signed-off-by: Priit Laes <plaes@plaes.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:31:21 -07:00
Priit Laes
879a901f7e
staging: csr: netdev.c: Clean up KERNEL_VERSION checks: 2.6.37
...
Signed-off-by: Priit Laes <plaes@plaes.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:30:16 -07:00
Priit Laes
6d99c525a0
staging: csr: netdev.c: Clean up KERNEL_VERSION checks: 2.6.34
...
Signed-off-by: Priit Laes <plaes@plaes.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:30:16 -07:00
Priit Laes
99b2c9d77e
staging: csr: netdev.c: Clean up KERNEL_VERSION checks: 2.6.32
...
Signed-off-by: Priit Laes <plaes@plaes.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:30:15 -07:00
Priit Laes
96bc8c7ab8
staging: csr: netdev.c: Clean up KERNEL_VERSION checks: 2.6.29
...
Signed-off-by: Priit Laes <plaes@plaes.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:30:15 -07:00
Priit Laes
a1a18726f4
staging: csr: netdev.c: Clean up KERNEL_VERSION checks: 2.6.28
...
Signed-off-by: Priit Laes <plaes@plaes.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 14:30:15 -07:00