~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/arm/mach-pxa/cm-x2xx-pci.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
unsigned long it8152_base_address;
30
30
static int cmx2xx_it8152_irq_gpio;
31
31
 
32
 
/*
33
 
 * Only first 64MB of memory can be accessed via PCI.
34
 
 * We use GFP_DMA to allocate safe buffers to do map/unmap.
35
 
 * This is really ugly and we need a better way of specifying
36
 
 * DMA-capable regions of memory.
37
 
 */
38
 
void __init cmx2xx_pci_adjust_zones(unsigned long *zone_size,
39
 
        unsigned long *zhole_size)
40
 
{
41
 
        unsigned int sz = SZ_64M >> PAGE_SHIFT;
42
 
 
43
 
        if (machine_is_armcore()) {
44
 
                pr_info("Adjusting zones for CM-X2XX\n");
45
 
 
46
 
                /*
47
 
                 * Only adjust if > 64M on current system
48
 
                 */
49
 
                if (zone_size[0] <= sz)
50
 
                        return;
51
 
 
52
 
                zone_size[1] = zone_size[0] - sz;
53
 
                zone_size[0] = sz;
54
 
                zhole_size[1] = zhole_size[0];
55
 
                zhole_size[0] = 0;
56
 
        }
57
 
}
58
 
 
59
32
static void cmx2xx_it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
60
33
{
61
34
        /* clear our parent irq */
70
43
 
71
44
        cmx2xx_it8152_irq_gpio = irq_gpio;
72
45
 
73
 
        set_irq_type(gpio_to_irq(irq_gpio), IRQ_TYPE_EDGE_RISING);
 
46
        irq_set_irq_type(gpio_to_irq(irq_gpio), IRQ_TYPE_EDGE_RISING);
74
47
 
75
 
        set_irq_chained_handler(gpio_to_irq(irq_gpio), cmx2xx_it8152_irq_demux);
 
48
        irq_set_chained_handler(gpio_to_irq(irq_gpio),
 
49
                                cmx2xx_it8152_irq_demux);
76
50
}
77
51
 
78
52
#ifdef CONFIG_PM