Commit 7cb26959 authored by Alexander Viro's avatar Alexander Viro Committed by Jeff Garzik

[PATCH] s2io iomem annotations and cleanups

	* usual iomem annotations
	* u64 is not an equivalent to pointer; unsigned long is
	* cast-as-lvalue ugliness killed.
	* caddr_t has no place in kernel (and these guys were iomem pointers,
actually).
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent de36a0d8
This diff is collapsed.
...@@ -583,7 +583,7 @@ typedef struct mac_info { ...@@ -583,7 +583,7 @@ typedef struct mac_info {
/* tx side stuff */ /* tx side stuff */
/* logical pointer of start of each Tx FIFO */ /* logical pointer of start of each Tx FIFO */
TxFIFO_element_t *tx_FIFO_start[MAX_TX_FIFOS]; TxFIFO_element_t __iomem *tx_FIFO_start[MAX_TX_FIFOS];
/* Current offset within tx_FIFO_start, where driver would write new Tx frame*/ /* Current offset within tx_FIFO_start, where driver would write new Tx frame*/
tx_curr_put_info_t tx_curr_put_info[MAX_TX_FIFOS]; tx_curr_put_info_t tx_curr_put_info[MAX_TX_FIFOS];
...@@ -623,8 +623,8 @@ typedef struct s2io_nic { ...@@ -623,8 +623,8 @@ typedef struct s2io_nic {
macaddr_t pre_mac_addr[MAX_MAC_SUPPORTED]; macaddr_t pre_mac_addr[MAX_MAC_SUPPORTED];
struct net_device_stats stats; struct net_device_stats stats;
caddr_t bar0; void __iomem *bar0;
caddr_t bar1; void __iomem *bar1;
struct config_param config; struct config_param config;
mac_info_t mac_control; mac_info_t mac_control;
int high_dma_flag; int high_dma_flag;
...@@ -736,19 +736,18 @@ typedef struct s2io_nic { ...@@ -736,19 +736,18 @@ typedef struct s2io_nic {
/* OS related system calls */ /* OS related system calls */
#ifndef readq #ifndef readq
static inline u64 readq(void *addr) static inline u64 readq(void __iomem *addr)
{ {
u64 ret = 0; u64 ret = readl(addr + 4);
ret = readl(addr + 4); ret <<= 32;
(u64) ret <<= 32; ret |= readl(addr);
(u64) ret |= readl(addr);
return ret; return ret;
} }
#endif #endif
#ifndef writeq #ifndef writeq
static inline void writeq(u64 val, void *addr) static inline void writeq(u64 val, void __iomem *addr)
{ {
writel((u32) (val), addr); writel((u32) (val), addr);
writel((u32) (val >> 32), (addr + 4)); writel((u32) (val >> 32), (addr + 4));
...@@ -762,7 +761,7 @@ static inline void writeq(u64 val, void *addr) ...@@ -762,7 +761,7 @@ static inline void writeq(u64 val, void *addr)
*/ */
#define UF 1 #define UF 1
#define LF 2 #define LF 2
static inline void SPECIAL_REG_WRITE(u64 val, void *addr, int order) static inline void SPECIAL_REG_WRITE(u64 val, void __iomem *addr, int order)
{ {
if (order == LF) { if (order == LF) {
writel((u32) (val), addr); writel((u32) (val), addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment