diff options
Diffstat (limited to 'include/asm-arm/hardware/locomo.h')
-rw-r--r-- | include/asm-arm/hardware/locomo.h | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/include/asm-arm/hardware/locomo.h b/include/asm-arm/hardware/locomo.h index 22dfb1737768..adab77780ed3 100644 --- a/include/asm-arm/hardware/locomo.h +++ b/include/asm-arm/hardware/locomo.h | |||
@@ -54,17 +54,18 @@ | |||
54 | #define LOCOMO_DAC_SDAOEB 0x01 /* SDA pin output data */ | 54 | #define LOCOMO_DAC_SDAOEB 0x01 /* SDA pin output data */ |
55 | 55 | ||
56 | /* SPI interface */ | 56 | /* SPI interface */ |
57 | #define LOCOMO_SPIMD 0x60 /* SPI mode setting */ | 57 | #define LOCOMO_SPI 0x60 |
58 | #define LOCOMO_SPICT 0x64 /* SPI mode control */ | 58 | #define LOCOMO_SPIMD 0x00 /* SPI mode setting */ |
59 | #define LOCOMO_SPIST 0x68 /* SPI status */ | 59 | #define LOCOMO_SPICT 0x04 /* SPI mode control */ |
60 | #define LOCOMO_SPIIS 0x70 /* SPI interrupt status */ | 60 | #define LOCOMO_SPIST 0x08 /* SPI status */ |
61 | #define LOCOMO_SPIWE 0x74 /* SPI interrupt status write enable */ | 61 | #define LOCOMO_SPIIS 0x10 /* SPI interrupt status */ |
62 | #define LOCOMO_SPIIE 0x78 /* SPI interrupt enable */ | 62 | #define LOCOMO_SPIWE 0x14 /* SPI interrupt status write enable */ |
63 | #define LOCOMO_SPIIR 0x7c /* SPI interrupt request */ | 63 | #define LOCOMO_SPIIE 0x18 /* SPI interrupt enable */ |
64 | #define LOCOMO_SPITD 0x80 /* SPI transfer data write */ | 64 | #define LOCOMO_SPIIR 0x1c /* SPI interrupt request */ |
65 | #define LOCOMO_SPIRD 0x84 /* SPI receive data read */ | 65 | #define LOCOMO_SPITD 0x20 /* SPI transfer data write */ |
66 | #define LOCOMO_SPITS 0x88 /* SPI transfer data shift */ | 66 | #define LOCOMO_SPIRD 0x24 /* SPI receive data read */ |
67 | #define LOCOMO_SPIRS 0x8C /* SPI receive data shift */ | 67 | #define LOCOMO_SPITS 0x28 /* SPI transfer data shift */ |
68 | #define LOCOMO_SPIRS 0x2C /* SPI receive data shift */ | ||
68 | #define LOCOMO_SPI_TEND (1 << 3) /* Transfer end bit */ | 69 | #define LOCOMO_SPI_TEND (1 << 3) /* Transfer end bit */ |
69 | #define LOCOMO_SPI_OVRN (1 << 2) /* Over Run bit */ | 70 | #define LOCOMO_SPI_OVRN (1 << 2) /* Over Run bit */ |
70 | #define LOCOMO_SPI_RFW (1 << 1) /* write buffer bit */ | 71 | #define LOCOMO_SPI_RFW (1 << 1) /* write buffer bit */ |
@@ -161,6 +162,7 @@ extern struct bus_type locomo_bus_type; | |||
161 | #define LOCOMO_DEVID_AUDIO 3 | 162 | #define LOCOMO_DEVID_AUDIO 3 |
162 | #define LOCOMO_DEVID_LED 4 | 163 | #define LOCOMO_DEVID_LED 4 |
163 | #define LOCOMO_DEVID_UART 5 | 164 | #define LOCOMO_DEVID_UART 5 |
165 | #define LOCOMO_DEVID_SPI 6 | ||
164 | 166 | ||
165 | struct locomo_dev { | 167 | struct locomo_dev { |
166 | struct device dev; | 168 | struct device dev; |
@@ -197,10 +199,11 @@ int locomo_driver_register(struct locomo_driver *); | |||
197 | void locomo_driver_unregister(struct locomo_driver *); | 199 | void locomo_driver_unregister(struct locomo_driver *); |
198 | 200 | ||
199 | /* GPIO control functions */ | 201 | /* GPIO control functions */ |
200 | void locomo_gpio_set_dir(struct locomo_dev *ldev, unsigned int bits, unsigned int dir); | 202 | void locomo_gpio_set_dir(struct device *dev, unsigned int bits, unsigned int dir); |
201 | unsigned int locomo_gpio_read_level(struct locomo_dev *ldev, unsigned int bits); | 203 | int locomo_gpio_read_level(struct device *dev, unsigned int bits); |
202 | unsigned int locomo_gpio_read_output(struct locomo_dev *ldev, unsigned int bits); | 204 | int locomo_gpio_read_output(struct device *dev, unsigned int bits); |
203 | void locomo_gpio_write(struct locomo_dev *ldev, unsigned int bits, unsigned int set); | 205 | void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set); |
206 | |||
204 | 207 | ||
205 | /* M62332 control function */ | 208 | /* M62332 control function */ |
206 | void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel); | 209 | void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel); |