diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-arm/arch-sa1100/irqs.h | 2 | ||||
| -rw-r--r-- | include/asm-arm/hardware/locomo.h | 19 |
2 files changed, 12 insertions, 9 deletions
diff --git a/include/asm-arm/arch-sa1100/irqs.h b/include/asm-arm/arch-sa1100/irqs.h index d7940683efb1..7bf80484bb77 100644 --- a/include/asm-arm/arch-sa1100/irqs.h +++ b/include/asm-arm/arch-sa1100/irqs.h | |||
| @@ -141,7 +141,7 @@ | |||
| 141 | #define IRQ_LOCOMO_LT (IRQ_BOARD_END + 17) | 141 | #define IRQ_LOCOMO_LT (IRQ_BOARD_END + 17) |
| 142 | #define IRQ_LOCOMO_SPI_RFR (IRQ_BOARD_END + 18) | 142 | #define IRQ_LOCOMO_SPI_RFR (IRQ_BOARD_END + 18) |
| 143 | #define IRQ_LOCOMO_SPI_RFW (IRQ_BOARD_END + 19) | 143 | #define IRQ_LOCOMO_SPI_RFW (IRQ_BOARD_END + 19) |
| 144 | #define IRQ_LOCOMO_SPI_OVRN (IRQ_BOARD_END + 20) | 144 | #define IRQ_LOCOMO_SPI_REND (IRQ_BOARD_END + 20) |
| 145 | #define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21) | 145 | #define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21) |
| 146 | 146 | ||
| 147 | /* | 147 | /* |
diff --git a/include/asm-arm/hardware/locomo.h b/include/asm-arm/hardware/locomo.h index adab77780ed3..fb0645de6f31 100644 --- a/include/asm-arm/hardware/locomo.h +++ b/include/asm-arm/hardware/locomo.h | |||
| @@ -58,6 +58,11 @@ | |||
| 58 | #define LOCOMO_SPIMD 0x00 /* SPI mode setting */ | 58 | #define LOCOMO_SPIMD 0x00 /* SPI mode setting */ |
| 59 | #define LOCOMO_SPICT 0x04 /* SPI mode control */ | 59 | #define LOCOMO_SPICT 0x04 /* SPI mode control */ |
| 60 | #define LOCOMO_SPIST 0x08 /* SPI status */ | 60 | #define LOCOMO_SPIST 0x08 /* SPI status */ |
| 61 | #define LOCOMO_SPI_TEND (1 << 3) /* Transfer end bit */ | ||
| 62 | #define LOCOMO_SPI_REND (1 << 2) /* Receive end bit */ | ||
| 63 | #define LOCOMO_SPI_RFW (1 << 1) /* write buffer bit */ | ||
| 64 | #define LOCOMO_SPI_RFR (1) /* read buffer bit */ | ||
| 65 | |||
| 61 | #define LOCOMO_SPIIS 0x10 /* SPI interrupt status */ | 66 | #define LOCOMO_SPIIS 0x10 /* SPI interrupt status */ |
| 62 | #define LOCOMO_SPIWE 0x14 /* SPI interrupt status write enable */ | 67 | #define LOCOMO_SPIWE 0x14 /* SPI interrupt status write enable */ |
| 63 | #define LOCOMO_SPIIE 0x18 /* SPI interrupt enable */ | 68 | #define LOCOMO_SPIIE 0x18 /* SPI interrupt enable */ |
| @@ -66,16 +71,12 @@ | |||
| 66 | #define LOCOMO_SPIRD 0x24 /* SPI receive data read */ | 71 | #define LOCOMO_SPIRD 0x24 /* SPI receive data read */ |
| 67 | #define LOCOMO_SPITS 0x28 /* SPI transfer data shift */ | 72 | #define LOCOMO_SPITS 0x28 /* SPI transfer data shift */ |
| 68 | #define LOCOMO_SPIRS 0x2C /* SPI receive data shift */ | 73 | #define LOCOMO_SPIRS 0x2C /* SPI receive data shift */ |
| 69 | #define LOCOMO_SPI_TEND (1 << 3) /* Transfer end bit */ | ||
| 70 | #define LOCOMO_SPI_OVRN (1 << 2) /* Over Run bit */ | ||
| 71 | #define LOCOMO_SPI_RFW (1 << 1) /* write buffer bit */ | ||
| 72 | #define LOCOMO_SPI_RFR (1) /* read buffer bit */ | ||
| 73 | 74 | ||
| 74 | /* GPIO */ | 75 | /* GPIO */ |
| 75 | #define LOCOMO_GPD 0x90 /* GPIO direction */ | 76 | #define LOCOMO_GPD 0x90 /* GPIO direction */ |
| 76 | #define LOCOMO_GPE 0x94 /* GPIO input enable */ | 77 | #define LOCOMO_GPE 0x94 /* GPIO input enable */ |
| 77 | #define LOCOMO_GPL 0x98 /* GPIO level */ | 78 | #define LOCOMO_GPL 0x98 /* GPIO level */ |
| 78 | #define LOCOMO_GPO 0x9c /* GPIO out data setteing */ | 79 | #define LOCOMO_GPO 0x9c /* GPIO out data setting */ |
| 79 | #define LOCOMO_GRIE 0xa0 /* GPIO rise detection */ | 80 | #define LOCOMO_GRIE 0xa0 /* GPIO rise detection */ |
| 80 | #define LOCOMO_GFIE 0xa4 /* GPIO fall detection */ | 81 | #define LOCOMO_GFIE 0xa4 /* GPIO fall detection */ |
| 81 | #define LOCOMO_GIS 0xa8 /* GPIO edge detection status */ | 82 | #define LOCOMO_GIS 0xa8 /* GPIO edge detection status */ |
| @@ -96,6 +97,9 @@ | |||
| 96 | #define LOCOMO_GPIO_DAC_SDATA LOCOMO_GPIO(10) | 97 | #define LOCOMO_GPIO_DAC_SDATA LOCOMO_GPIO(10) |
| 97 | #define LOCOMO_GPIO_DAC_SCK LOCOMO_GPIO(11) | 98 | #define LOCOMO_GPIO_DAC_SCK LOCOMO_GPIO(11) |
| 98 | #define LOCOMO_GPIO_DAC_SLOAD LOCOMO_GPIO(12) | 99 | #define LOCOMO_GPIO_DAC_SLOAD LOCOMO_GPIO(12) |
| 100 | #define LOCOMO_GPIO_CARD_DETECT LOCOMO_GPIO(13) | ||
| 101 | #define LOCOMO_GPIO_WRITE_PROT LOCOMO_GPIO(14) | ||
| 102 | #define LOCOMO_GPIO_CARD_POWER LOCOMO_GPIO(15) | ||
| 99 | 103 | ||
| 100 | /* Start the definitions of the devices. Each device has an initial | 104 | /* Start the definitions of the devices. Each device has an initial |
| 101 | * base address and a series of offsets from that base address. */ | 105 | * base address and a series of offsets from that base address. */ |
| @@ -122,7 +126,7 @@ | |||
| 122 | /* Audio controller */ | 126 | /* Audio controller */ |
| 123 | #define LOCOMO_AUDIO 0x54 | 127 | #define LOCOMO_AUDIO 0x54 |
| 124 | #define LOCOMO_ACC 0x00 /* Audio clock */ | 128 | #define LOCOMO_ACC 0x00 /* Audio clock */ |
| 125 | #define LOCOMO_PAIF 0x7C /* PCM audio interface */ | 129 | #define LOCOMO_PAIF 0xD0 /* PCM audio interface */ |
| 126 | /* Audio clock */ | 130 | /* Audio clock */ |
| 127 | #define LOCOMO_ACC_XON 0x80 | 131 | #define LOCOMO_ACC_XON 0x80 |
| 128 | #define LOCOMO_ACC_XEN 0x40 | 132 | #define LOCOMO_ACC_XEN 0x40 |
| @@ -162,7 +166,7 @@ extern struct bus_type locomo_bus_type; | |||
| 162 | #define LOCOMO_DEVID_AUDIO 3 | 166 | #define LOCOMO_DEVID_AUDIO 3 |
| 163 | #define LOCOMO_DEVID_LED 4 | 167 | #define LOCOMO_DEVID_LED 4 |
| 164 | #define LOCOMO_DEVID_UART 5 | 168 | #define LOCOMO_DEVID_UART 5 |
| 165 | #define LOCOMO_DEVID_SPI 6 | 169 | #define LOCOMO_DEVID_SPI 6 |
| 166 | 170 | ||
| 167 | struct locomo_dev { | 171 | struct locomo_dev { |
| 168 | struct device dev; | 172 | struct device dev; |
| @@ -204,7 +208,6 @@ int locomo_gpio_read_level(struct device *dev, unsigned int bits); | |||
| 204 | int locomo_gpio_read_output(struct device *dev, unsigned int bits); | 208 | int locomo_gpio_read_output(struct device *dev, unsigned int bits); |
| 205 | void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set); | 209 | void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set); |
| 206 | 210 | ||
| 207 | |||
| 208 | /* M62332 control function */ | 211 | /* M62332 control function */ |
| 209 | void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel); | 212 | void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel); |
| 210 | 213 | ||
