diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-30 07:13:46 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-09-29 11:20:24 -0400 |
commit | 00990e7ce0b0e596fe41d9c64d6933ea70084003 (patch) | |
tree | 189e0dd92860feba84231c66955749574cac5d6d /drivers/scsi/pcmcia/sym53c500_cs.c | |
parent | 440eed43e2a95bb842488755683716814da10f2b (diff) |
pcmcia: use autoconfiguration feature for ioports and iomem
When CONF_AUTO_SET_IO or CONF_AUTO_SET_IOMEM are set, the corresponding
fields in struct pcmcia_device *p_dev->resource[0,1,2] are set
accordinly. Drivers wishing to override certain settings may do so in
the callback function, but they no longer need to parse the CIS entries
stored in cistpl_cftable_entry_t themselves.
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-ide@vger.kernel.org
CC: linux-usb@vger.kernel.org
CC: laforge@gnumonks.org
CC: linux-mtd@lists.infradead.org
CC: linux-bluetooth@vger.kernel.org
CC: alsa-devel@alsa-project.org
CC: linux-serial@vger.kernel.org
CC: Jiri Kosina <jkosina@suse.cz>
CC: linux-scsi@vger.kernel.org
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/scsi/pcmcia/sym53c500_cs.c')
-rw-r--r-- | drivers/scsi/pcmcia/sym53c500_cs.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c index 7a0bb9aea042..6ceb57c355fa 100644 --- a/drivers/scsi/pcmcia/sym53c500_cs.c +++ b/drivers/scsi/pcmcia/sym53c500_cs.c | |||
@@ -683,14 +683,11 @@ static struct scsi_host_template sym53c500_driver_template = { | |||
683 | .shost_attrs = SYM53C500_shost_attrs | 683 | .shost_attrs = SYM53C500_shost_attrs |
684 | }; | 684 | }; |
685 | 685 | ||
686 | static int SYM53C500_config_check(struct pcmcia_device *p_dev, | 686 | static int SYM53C500_config_check(struct pcmcia_device *p_dev, void *priv_data) |
687 | cistpl_cftable_entry_t *cfg, | ||
688 | cistpl_cftable_entry_t *dflt, | ||
689 | void *priv_data) | ||
690 | { | 687 | { |
691 | p_dev->io_lines = 10; | 688 | p_dev->io_lines = 10; |
692 | p_dev->resource[0]->start = cfg->io.win[0].base; | 689 | p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; |
693 | p_dev->resource[0]->end = cfg->io.win[0].len; | 690 | p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
694 | 691 | ||
695 | if (p_dev->resource[0]->start == 0) | 692 | if (p_dev->resource[0]->start == 0) |
696 | return -ENODEV; | 693 | return -ENODEV; |
@@ -857,9 +854,7 @@ SYM53C500_probe(struct pcmcia_device *link) | |||
857 | return -ENOMEM; | 854 | return -ENOMEM; |
858 | info->p_dev = link; | 855 | info->p_dev = link; |
859 | link->priv = info; | 856 | link->priv = info; |
860 | link->resource[0]->end = 16; | 857 | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; |
861 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; | ||
862 | link->config_flags |= CONF_ENABLE_IRQ; | ||
863 | 858 | ||
864 | return SYM53C500_config(link); | 859 | return SYM53C500_config(link); |
865 | } /* SYM53C500_attach */ | 860 | } /* SYM53C500_attach */ |