~ubuntu-branches/ubuntu/karmic/linux-ports/karmic

« back to all changes in this revision

Viewing changes to arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich, Luke Yelavich, Michael Casadevall, Tim Gardner, Upstream Kernel Changes
  • Date: 2009-05-06 18:18:55 UTC
  • Revision ID: james.westby@ubuntu.com-20090506181855-t00baeevpnvd9o7a
Tags: 2.6.30-1.1
[ Luke Yelavich ]
* initial release for karmic
* SAUCE: rebase-ports - adjust for the karmic ports kernel
* SAUCE: rebase-ports - also remove abi dirs/files on rebase
* Update configs after rebase against mainline Jaunty tree
* [Config] Disable CONFIG_BLK_DEV_UB and CONFIG_USB_LIBUSUAL as per
  mainline jaunty
* forward-port patch to drbd for powerpc compilation
* [Config] disable CONFIG_LENOVO_SL_LAPTOP for i386 due to FTBFS
* add .o files found in arch/powerpc/lib to all powerpc kernel header
  packages
* [Config] enable CONFIG_DRM_I915_KMS for i386 as per karmic mainline

[ Michael Casadevall ]

* Disable kgdb on sparc64
* [sparc] [Config] Disable GPIO LEDS
* [ia64] Rename -ia64-generic to -ia64 in line with other architectures
* Correct kernel image path for sparc builds
* [hppa] Fix HPPA config files to build modules for all udebian

Rebase on top of karmic mainline 2.6.30-1.1

[ Tim Gardner ]

* [Config] armel: disable staging drivers, fixes FTBS
* [Config] armel imx51: Disable CONFIG_MTD_NAND_MXC, fixes FTBS

[ Upstream Kernel Changes ]

* mpt2sas: Change reset_type enum to avoid namespace collision.
  Submitted upstream.

* Initial release after rebasing against v2.6.30-rc3

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
#define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54
54
#define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55
55
 
56
 
#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57
 
#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
58
 
#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
 
56
#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
 
57
#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
 
58
#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
59
59
#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60
60
#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61
61
 
87
87
struct bfin_serial_port {
88
88
        struct uart_port        port;
89
89
        unsigned int            old_status;
 
90
        int                     status_irq;
90
91
        unsigned int lsr;
91
92
#ifdef CONFIG_SERIAL_BFIN_DMA
92
93
        int                     tx_done;
99
100
        struct work_struct      tx_dma_workqueue;
100
101
#endif
101
102
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
102
 
        struct timer_list       cts_timer;
103
103
        int             cts_pin;
104
104
        int             rts_pin;
105
105
#endif
125
125
struct bfin_serial_res {
126
126
        unsigned long   uart_base_addr;
127
127
        int             uart_irq;
 
128
        int             uart_status_irq;
128
129
#ifdef CONFIG_SERIAL_BFIN_DMA
129
130
        unsigned int    uart_tx_dma_channel;
130
131
        unsigned int    uart_rx_dma_channel;
140
141
        {
141
142
        0xFFC00400,
142
143
        IRQ_UART0_RX,
 
144
        IRQ_UART0_ERROR,
143
145
#ifdef CONFIG_SERIAL_BFIN_DMA
144
146
        CH_UART0_TX,
145
147
        CH_UART0_RX,
146
148
#endif
147
 
#ifdef CONFIG_BFIN_UART0_CTSRTS
 
149
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
148
150
        CONFIG_UART0_CTS_PIN,
149
151
        CONFIG_UART0_RTS_PIN,
150
152
#endif
154
156
        {
155
157
        0xFFC02000,
156
158
        IRQ_UART1_RX,
 
159
        IRQ_UART1_ERROR,
157
160
#ifdef CONFIG_SERIAL_BFIN_DMA
158
161
        CH_UART1_TX,
159
162
        CH_UART1_RX,
160
163
#endif
161
 
#ifdef CONFIG_BFIN_UART1_CTSRTS
 
164
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
162
165
        CONFIG_UART1_CTS_PIN,
163
166
        CONFIG_UART1_RTS_PIN,
164
167
#endif
167
170
};
168
171
 
169
172
#define DRIVER_NAME "bfin-uart"
170
 
 
171
 
static void bfin_serial_hw_init(struct bfin_serial_port *uart)
172
 
{
173
 
 
174
 
#ifdef CONFIG_SERIAL_BFIN_UART0
175
 
        peripheral_request(P_UART0_TX, DRIVER_NAME);
176
 
        peripheral_request(P_UART0_RX, DRIVER_NAME);
177
 
#endif
178
 
 
179
 
#ifdef CONFIG_SERIAL_BFIN_UART1
180
 
        peripheral_request(P_UART1_TX, DRIVER_NAME);
181
 
        peripheral_request(P_UART1_RX, DRIVER_NAME);
182
 
#endif
183
 
 
184
 
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
185
 
        if (uart->cts_pin >= 0) {
186
 
                gpio_request(uart->cts_pin, DRIVER_NAME);
187
 
                gpio_direction_input(uart->cts_pin);
188
 
        }
189
 
 
190
 
        if (uart->rts_pin >= 0) {
191
 
                gpio_request(uart->rts_pin, DRIVER_NAME);
192
 
                gpio_direction_output(uart->rts_pin, 0);
193
 
        }
194
 
#endif
195
 
}