mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
pcmcia: do not use io_req_t when calling pcmcia_request_io()
Instead of io_req_t, drivers are now requested to fill out struct pcmcia_device *p_dev->resource[0,1] for up to two ioport ranges. After a call to pcmcia_request_io(), the ports found there are reserved, after calling pcmcia_request_configuration(), they may be used. CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: Michael Buesch <[email protected]> Acked-by: Marcel Holtmann <[email protected]> (for drivers/bluetooth/) Signed-off-by: Dominik Brodowski <[email protected]>
This commit is contained in:
parent
9a017a9103
commit
90abdc3b97
57 changed files with 527 additions and 584 deletions
|
|
@ -56,23 +56,6 @@ typedef struct config_req_t {
|
|||
#define INT_CARDBUS 0x04
|
||||
#define INT_ZOOMED_VIDEO 0x08
|
||||
|
||||
/* For RequestIO and ReleaseIO */
|
||||
typedef struct io_req_t {
|
||||
u_int BasePort1;
|
||||
u_int NumPorts1;
|
||||
u_int Attributes1;
|
||||
u_int BasePort2;
|
||||
u_int NumPorts2;
|
||||
u_int Attributes2;
|
||||
u_int IOAddrLines;
|
||||
} io_req_t;
|
||||
|
||||
/* Attributes for RequestIO and ReleaseIO */
|
||||
#define IO_DATA_PATH_WIDTH 0x18
|
||||
#define IO_DATA_PATH_WIDTH_8 0x00
|
||||
#define IO_DATA_PATH_WIDTH_16 0x08
|
||||
#define IO_DATA_PATH_WIDTH_AUTO 0x10
|
||||
|
||||
/* Bits in IRQInfo1 field */
|
||||
#define IRQ_NMI_ID 0x01
|
||||
#define IRQ_IOCK_ID 0x02
|
||||
|
|
|
|||
|
|
@ -80,7 +80,6 @@ struct pcmcia_device {
|
|||
struct list_head socket_device_list;
|
||||
|
||||
/* deprecated, will be cleaned up soon */
|
||||
io_req_t io;
|
||||
config_req_t conf;
|
||||
window_handle_t win;
|
||||
|
||||
|
|
@ -88,6 +87,8 @@ struct pcmcia_device {
|
|||
unsigned int irq;
|
||||
struct resource *resource[MAX_IO_WIN];
|
||||
|
||||
unsigned int io_lines; /* number of I/O lines */
|
||||
|
||||
/* Is the device suspended? */
|
||||
u16 suspended:1;
|
||||
|
||||
|
|
@ -179,7 +180,7 @@ int pcmcia_read_config_byte(struct pcmcia_device *p_dev, off_t where, u8 *val);
|
|||
int pcmcia_write_config_byte(struct pcmcia_device *p_dev, off_t where, u8 val);
|
||||
|
||||
/* device configuration */
|
||||
int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req);
|
||||
int pcmcia_request_io(struct pcmcia_device *p_dev);
|
||||
|
||||
int __must_check
|
||||
__pcmcia_request_exclusive_irq(struct pcmcia_device *p_dev,
|
||||
|
|
@ -206,6 +207,22 @@ int pcmcia_map_mem_page(struct pcmcia_device *p_dev, window_handle_t win,
|
|||
int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod);
|
||||
void pcmcia_disable_device(struct pcmcia_device *p_dev);
|
||||
|
||||
/* IO ports */
|
||||
#define IO_DATA_PATH_WIDTH 0x18
|
||||
#define IO_DATA_PATH_WIDTH_8 0x00
|
||||
#define IO_DATA_PATH_WIDTH_16 0x08
|
||||
#define IO_DATA_PATH_WIDTH_AUTO 0x10
|
||||
|
||||
/* convert flag found in cfgtable to data path width parameter */
|
||||
static inline int pcmcia_io_cfg_data_width(unsigned int flags)
|
||||
{
|
||||
if (!(flags & CISTPL_IO_8BIT))
|
||||
return IO_DATA_PATH_WIDTH_16;
|
||||
if (!(flags & CISTPL_IO_16BIT))
|
||||
return IO_DATA_PATH_WIDTH_8;
|
||||
return IO_DATA_PATH_WIDTH_AUTO;
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_DS_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue