Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9b2c4d0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (50 commits)
  pcmcia: rework the irq_req_t typedef
  pcmcia: remove deprecated handle_to_dev() macro
  pcmcia: pcmcia_request_window() doesn't need a pointer to a pointer
  pcmcia: remove unused "window_t" typedef
  pcmcia: move some window-related code to pcmcia_ioctl.c
  pcmcia: Change window_handle_t logic to unsigned long
  pcmcia: Pass struct pcmcia_socket to pcmcia_get_mem_page()
  pcmcia: Pass struct pcmcia_device to pcmcia_map_mem_page()
  pcmcia: Pass struct pcmcia_device to pcmcia_release_window()
  drivers/pcmcia: remove unnecessary kzalloc
  pcmcia: correct handling for Zoomed Video registers in topic.h
  pcmcia: fix printk formats
  pcmcia: autoload module pcmcia
  pcmcia/staging: update comedi drivers
  PCMCIA: stop duplicating pci_irq in soc_pcmcia_socket
  PCMCIA: ss: allow PCI IRQs > 255
  PCMCIA: soc_common: remove 'dev' member from soc_pcmcia_socket
  PCMCIA: soc_common: constify soc_pcmcia_socket ops member
  PCMCIA: sa1111: remove duplicated initializers
  PCMCIA: sa1111: wrap soc_pcmcia_socket to contain sa1111 specific data
  ...
parents 27d16d08 5fa9167a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
This file details changes in 2.6 which affect PCMCIA card driver authors:

* no cs_error / CS_CHECK / CONFIG_PCMCIA_DEBUG (as of 2.6.33)
   Instead of the cs_error() callback or the CS_CHECK() macro, please use
   Linux-style checking of return values, and -- if necessary -- debug
   messages using "dev_dbg()" or "pr_debug()".

* New CIS tuple access (as of 2.6.33)
   Instead of pcmcia_get_{first,next}_tuple(), pcmcia_get_tuple_data() and
   pcmcia_parse_tuple(), a driver shall use "pcmcia_get_tuple()" if it is
   only interested in one (raw) tuple, or "pcmcia_loop_tuple()" if it is
   interested in all tuples of one type. To decode the MAC from CISTPL_FUNCE,
   a new helper "pcmcia_get_mac_from_cis()" was added.

* New configuration loop helper (as of 2.6.28)
   By calling pcmcia_loop_config(), a driver can iterate over all available
   configuration options. During a driver's probe() phase, one doesn't need
+8 −9
Original line number Diff line number Diff line
@@ -177,9 +177,6 @@ static struct ata_port_operations pcmcia_8bit_port_ops = {
	.drain_fifo	= pcmcia_8bit_drain_fifo,
};

#define CS_CHECK(fn, ret) \
do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)


struct pcmcia_config_check {
	unsigned long ctl_base;
@@ -252,7 +249,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
	struct ata_port *ap;
	struct ata_pcmcia_info *info;
	struct pcmcia_config_check *stk = NULL;
	int last_ret = 0, last_fn = 0, is_kme = 0, ret = -ENOMEM, p;
	int is_kme = 0, ret = -ENOMEM, p;
	unsigned long io_base, ctl_base;
	void __iomem *io_addr, *ctl_addr;
	int n_ports = 1;
@@ -271,7 +268,6 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
	pdev->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
	pdev->io.IOAddrLines = 3;
	pdev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
	pdev->irq.IRQInfo1 = IRQ_LEVEL_ID;
	pdev->conf.Attributes = CONF_ENABLE_IRQ;
	pdev->conf.IntType = INT_MEMORY_AND_IO;

@@ -296,8 +292,13 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
	}
	io_base = pdev->io.BasePort1;
	ctl_base = stk->ctl_base;
	CS_CHECK(RequestIRQ, pcmcia_request_irq(pdev, &pdev->irq));
	CS_CHECK(RequestConfiguration, pcmcia_request_configuration(pdev, &pdev->conf));
	ret = pcmcia_request_irq(pdev, &pdev->irq);
	if (ret)
		goto failed;

	ret = pcmcia_request_configuration(pdev, &pdev->conf);
	if (ret)
		goto failed;

	/* iomap */
	ret = -ENOMEM;
@@ -351,8 +352,6 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
	kfree(stk);
	return 0;

cs_failed:
	cs_error(pdev, last_fn, last_ret);
failed:
	kfree(stk);
	info->ndev = 0;
+4 −12
Original line number Diff line number Diff line
@@ -867,11 +867,9 @@ static int bluecard_probe(struct pcmcia_device *link)

	link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
	link->io.NumPorts1 = 8;
	link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
	link->irq.IRQInfo1 = IRQ_LEVEL_ID;
	link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;

	link->irq.Handler = bluecard_interrupt;
	link->irq.Instance = info;

	link->conf.Attributes = CONF_ENABLE_IRQ;
	link->conf.IntType = INT_MEMORY_AND_IO;
@@ -905,22 +903,16 @@ static int bluecard_config(struct pcmcia_device *link)
			break;
	}

	if (i != 0) {
		cs_error(link, RequestIO, i);
	if (i != 0)
		goto failed;
	}

	i = pcmcia_request_irq(link, &link->irq);
	if (i != 0) {
		cs_error(link, RequestIRQ, i);
	if (i != 0)
		link->irq.AssignedIRQ = 0;
	}

	i = pcmcia_request_configuration(link, &link->conf);
	if (i != 0) {
		cs_error(link, RequestConfiguration, i);
	if (i != 0)
		goto failed;
	}

	if (bluecard_open(info) != 0)
		goto failed;
+3 −10
Original line number Diff line number Diff line
@@ -659,11 +659,9 @@ static int bt3c_probe(struct pcmcia_device *link)

	link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
	link->io.NumPorts1 = 8;
	link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
	link->irq.IRQInfo1 = IRQ_LEVEL_ID;
	link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;

	link->irq.Handler = bt3c_interrupt;
	link->irq.Instance = info;

	link->conf.Attributes = CONF_ENABLE_IRQ;
	link->conf.IntType = INT_MEMORY_AND_IO;
@@ -740,21 +738,16 @@ static int bt3c_config(struct pcmcia_device *link)
		goto found_port;

	BT_ERR("No usable port range found");
	cs_error(link, RequestIO, -ENODEV);
	goto failed;

found_port:
	i = pcmcia_request_irq(link, &link->irq);
	if (i != 0) {
		cs_error(link, RequestIRQ, i);
	if (i != 0)
		link->irq.AssignedIRQ = 0;
	}

	i = pcmcia_request_configuration(link, &link->conf);
	if (i != 0) {
		cs_error(link, RequestConfiguration, i);
	if (i != 0)
		goto failed;
	}

	if (bt3c_open(info) != 0)
		goto failed;
+3 −10
Original line number Diff line number Diff line
@@ -588,11 +588,9 @@ static int btuart_probe(struct pcmcia_device *link)

	link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
	link->io.NumPorts1 = 8;
	link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
	link->irq.IRQInfo1 = IRQ_LEVEL_ID;
	link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;

	link->irq.Handler = btuart_interrupt;
	link->irq.Instance = info;

	link->conf.Attributes = CONF_ENABLE_IRQ;
	link->conf.IntType = INT_MEMORY_AND_IO;
@@ -669,21 +667,16 @@ static int btuart_config(struct pcmcia_device *link)
		goto found_port;

	BT_ERR("No usable port range found");
	cs_error(link, RequestIO, -ENODEV);
	goto failed;

found_port:
	i = pcmcia_request_irq(link, &link->irq);
	if (i != 0) {
		cs_error(link, RequestIRQ, i);
	if (i != 0)
		link->irq.AssignedIRQ = 0;
	}

	i = pcmcia_request_configuration(link, &link->conf);
	if (i != 0) {
		cs_error(link, RequestConfiguration, i);
	if (i != 0)
		goto failed;
	}

	if (btuart_open(info) != 0)
		goto failed;
Loading