diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/ds1620.c | 25 | ||||
-rw-r--r-- | drivers/char/nwflash.c | 8 | ||||
-rw-r--r-- | drivers/mtd/maps/dc21285.c | 7 |
3 files changed, 18 insertions, 22 deletions
diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c index 74e9cd81b5b2..61f0146e215d 100644 --- a/drivers/char/ds1620.c +++ b/drivers/char/ds1620.c | |||
@@ -43,52 +43,51 @@ static const char *fan_state[] = { "off", "on", "on (hardwired)" }; | |||
43 | * chance that the WaveArtist driver could touch these bits to | 43 | * chance that the WaveArtist driver could touch these bits to |
44 | * enable or disable the speaker. | 44 | * enable or disable the speaker. |
45 | */ | 45 | */ |
46 | extern spinlock_t gpio_lock; | ||
47 | extern unsigned int system_rev; | 46 | extern unsigned int system_rev; |
48 | 47 | ||
49 | static inline void netwinder_ds1620_set_clk(int clk) | 48 | static inline void netwinder_ds1620_set_clk(int clk) |
50 | { | 49 | { |
51 | gpio_modify_op(GPIO_DSCLK, clk ? GPIO_DSCLK : 0); | 50 | nw_gpio_modify_op(GPIO_DSCLK, clk ? GPIO_DSCLK : 0); |
52 | } | 51 | } |
53 | 52 | ||
54 | static inline void netwinder_ds1620_set_data(int dat) | 53 | static inline void netwinder_ds1620_set_data(int dat) |
55 | { | 54 | { |
56 | gpio_modify_op(GPIO_DATA, dat ? GPIO_DATA : 0); | 55 | nw_gpio_modify_op(GPIO_DATA, dat ? GPIO_DATA : 0); |
57 | } | 56 | } |
58 | 57 | ||
59 | static inline int netwinder_ds1620_get_data(void) | 58 | static inline int netwinder_ds1620_get_data(void) |
60 | { | 59 | { |
61 | return gpio_read() & GPIO_DATA; | 60 | return nw_gpio_read() & GPIO_DATA; |
62 | } | 61 | } |
63 | 62 | ||
64 | static inline void netwinder_ds1620_set_data_dir(int dir) | 63 | static inline void netwinder_ds1620_set_data_dir(int dir) |
65 | { | 64 | { |
66 | gpio_modify_io(GPIO_DATA, dir ? GPIO_DATA : 0); | 65 | nw_gpio_modify_io(GPIO_DATA, dir ? GPIO_DATA : 0); |
67 | } | 66 | } |
68 | 67 | ||
69 | static inline void netwinder_ds1620_reset(void) | 68 | static inline void netwinder_ds1620_reset(void) |
70 | { | 69 | { |
71 | cpld_modify(CPLD_DS_ENABLE, 0); | 70 | nw_cpld_modify(CPLD_DS_ENABLE, 0); |
72 | cpld_modify(CPLD_DS_ENABLE, CPLD_DS_ENABLE); | 71 | nw_cpld_modify(CPLD_DS_ENABLE, CPLD_DS_ENABLE); |
73 | } | 72 | } |
74 | 73 | ||
75 | static inline void netwinder_lock(unsigned long *flags) | 74 | static inline void netwinder_lock(unsigned long *flags) |
76 | { | 75 | { |
77 | spin_lock_irqsave(&gpio_lock, *flags); | 76 | spin_lock_irqsave(&nw_gpio_lock, *flags); |
78 | } | 77 | } |
79 | 78 | ||
80 | static inline void netwinder_unlock(unsigned long *flags) | 79 | static inline void netwinder_unlock(unsigned long *flags) |
81 | { | 80 | { |
82 | spin_unlock_irqrestore(&gpio_lock, *flags); | 81 | spin_unlock_irqrestore(&nw_gpio_lock, *flags); |
83 | } | 82 | } |
84 | 83 | ||
85 | static inline void netwinder_set_fan(int i) | 84 | static inline void netwinder_set_fan(int i) |
86 | { | 85 | { |
87 | unsigned long flags; | 86 | unsigned long flags; |
88 | 87 | ||
89 | spin_lock_irqsave(&gpio_lock, flags); | 88 | spin_lock_irqsave(&nw_gpio_lock, flags); |
90 | gpio_modify_op(GPIO_FAN, i ? GPIO_FAN : 0); | 89 | nw_gpio_modify_op(GPIO_FAN, i ? GPIO_FAN : 0); |
91 | spin_unlock_irqrestore(&gpio_lock, flags); | 90 | spin_unlock_irqrestore(&nw_gpio_lock, flags); |
92 | } | 91 | } |
93 | 92 | ||
94 | static inline int netwinder_get_fan(void) | 93 | static inline int netwinder_get_fan(void) |
@@ -96,7 +95,7 @@ static inline int netwinder_get_fan(void) | |||
96 | if ((system_rev & 0xf000) == 0x4000) | 95 | if ((system_rev & 0xf000) == 0x4000) |
97 | return FAN_ALWAYS_ON; | 96 | return FAN_ALWAYS_ON; |
98 | 97 | ||
99 | return (gpio_read() & GPIO_FAN) ? FAN_ON : FAN_OFF; | 98 | return (nw_gpio_read() & GPIO_FAN) ? FAN_ON : FAN_OFF; |
100 | } | 99 | } |
101 | 100 | ||
102 | /* | 101 | /* |
diff --git a/drivers/char/nwflash.c b/drivers/char/nwflash.c index 006be92ee3f3..8c7df5ba088f 100644 --- a/drivers/char/nwflash.c +++ b/drivers/char/nwflash.c | |||
@@ -58,8 +58,6 @@ static volatile unsigned char *FLASH_BASE; | |||
58 | static int gbFlashSize = KFLASH_SIZE; | 58 | static int gbFlashSize = KFLASH_SIZE; |
59 | static DEFINE_MUTEX(nwflash_mutex); | 59 | static DEFINE_MUTEX(nwflash_mutex); |
60 | 60 | ||
61 | extern spinlock_t gpio_lock; | ||
62 | |||
63 | static int get_flash_id(void) | 61 | static int get_flash_id(void) |
64 | { | 62 | { |
65 | volatile unsigned int c1, c2; | 63 | volatile unsigned int c1, c2; |
@@ -616,9 +614,9 @@ static void kick_open(void) | |||
616 | * we want to write a bit pattern XXX1 to Xilinx to enable | 614 | * we want to write a bit pattern XXX1 to Xilinx to enable |
617 | * the write gate, which will be open for about the next 2ms. | 615 | * the write gate, which will be open for about the next 2ms. |
618 | */ | 616 | */ |
619 | spin_lock_irqsave(&gpio_lock, flags); | 617 | spin_lock_irqsave(&nw_gpio_lock, flags); |
620 | cpld_modify(1, 1); | 618 | nw_cpld_modify(CPLD_FLASH_WR_ENABLE, CPLD_FLASH_WR_ENABLE); |
621 | spin_unlock_irqrestore(&gpio_lock, flags); | 619 | spin_unlock_irqrestore(&nw_gpio_lock, flags); |
622 | 620 | ||
623 | /* | 621 | /* |
624 | * let the ISA bus to catch on... | 622 | * let the ISA bus to catch on... |
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c index 3aa018c092f8..42969fe051b2 100644 --- a/drivers/mtd/maps/dc21285.c +++ b/drivers/mtd/maps/dc21285.c | |||
@@ -32,16 +32,15 @@ static struct mtd_info *dc21285_mtd; | |||
32 | */ | 32 | */ |
33 | static void nw_en_write(void) | 33 | static void nw_en_write(void) |
34 | { | 34 | { |
35 | extern spinlock_t gpio_lock; | ||
36 | unsigned long flags; | 35 | unsigned long flags; |
37 | 36 | ||
38 | /* | 37 | /* |
39 | * we want to write a bit pattern XXX1 to Xilinx to enable | 38 | * we want to write a bit pattern XXX1 to Xilinx to enable |
40 | * the write gate, which will be open for about the next 2ms. | 39 | * the write gate, which will be open for about the next 2ms. |
41 | */ | 40 | */ |
42 | spin_lock_irqsave(&gpio_lock, flags); | 41 | spin_lock_irqsave(&nw_gpio_lock, flags); |
43 | cpld_modify(1, 1); | 42 | nw_cpld_modify(CPLD_FLASH_WR_ENABLE, CPLD_FLASH_WR_ENABLE); |
44 | spin_unlock_irqrestore(&gpio_lock, flags); | 43 | spin_unlock_irqrestore(&nw_gpio_lock, flags); |
45 | 44 | ||
46 | /* | 45 | /* |
47 | * let the ISA bus to catch on... | 46 | * let the ISA bus to catch on... |