Commit a0113a99cc3cd1a63153d11b7fcf9c1a2000df57

Authored by Mike Rapoport
Committed by Russell King
1 parent 008f6d2a28

[ARM] 4667/1: CM-X270 fixes

Change printk to dev_dbg in ITE 8152 driver and remove printk in ITE 8152 ISR.
Move PCI intialization from ->scan to ->preinit method

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Showing 3 changed files with 17 additions and 19 deletions Side-by-side Diff

... ... @@ -537,7 +537,7 @@
537 537 bool
538 538  
539 539 config PCI
540   - bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB || ARCH_IXP4XX || ARCH_KS8695
  540 + bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB || ARCH_IXP4XX || ARCH_KS8695 || MACH_ARMCORE
541 541 help
542 542 Find out whether you have a PCI motherboard. PCI is the name of a
543 543 bus system, i.e. the way the CPU talks to the other stuff inside
... ... @@ -557,6 +557,12 @@
557 557 bool
558 558 depends on PCI && ARCH_SHARK
559 559 default y
  560 +
  561 +config PCI_HOST_ITE8152
  562 + bool
  563 + depends on PCI && MACH_ARMCORE
  564 + default y
  565 + select DMABOUNCE
560 566  
561 567 source "drivers/pci/Kconfig"
562 568  
arch/arm/common/it8152.c
... ... @@ -70,8 +70,6 @@
70 70 {
71 71 struct irq_desc *desc;
72 72  
73   - printk(KERN_DEBUG "===> %s: irq=%d\n", __FUNCTION__, irq);
74   -
75 73 desc = irq_desc + irq;
76 74 desc_handle_irq(irq, desc);
77 75 }
... ... @@ -106,8 +104,6 @@
106 104 int bits_pd, bits_lp, bits_ld;
107 105 int i;
108 106  
109   - printk(KERN_DEBUG "=> %s: irq = %d\n", __FUNCTION__, irq);
110   -
111 107 while (1) {
112 108 /* Read all */
113 109 bits_pd = __raw_readl(IT8152_INTC_PDCNIRR);
... ... @@ -293,8 +289,7 @@
293 289 */
294 290 int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
295 291 {
296   - printk(KERN_DEBUG "%s: %s %llx\n",
297   - __FUNCTION__, dev->dev.bus_id, mask);
  292 + dev_dbg(&dev->dev, "%s: %llx\n", __FUNCTION__, mask);
298 293 if (mask >= PHYS_OFFSET + SZ_64M - 1)
299 294 return 0;
300 295  
... ... @@ -304,8 +299,7 @@
304 299 int
305 300 pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
306 301 {
307   - printk(KERN_DEBUG "%s: %s %llx\n",
308   - __FUNCTION__, dev->dev.bus_id, mask);
  302 + dev_dbg(&dev->dev, "%s: %llx\n", __FUNCTION__, mask);
309 303 if (mask >= PHYS_OFFSET + SZ_64M - 1)
310 304 return 0;
311 305  
arch/arm/mach-pxa/cm-x270-pci.c
... ... @@ -40,7 +40,7 @@
40 40 {
41 41 unsigned int sz = SZ_64M >> PAGE_SHIFT;
42 42  
43   - printk(KERN_INFO "Adjusting zones for CM-x270\n");
  43 + pr_info("Adjusting zones for CM-x270\n");
44 44  
45 45 /*
46 46 * Only adjust if > 64M on current system
... ... @@ -104,8 +104,7 @@
104 104 {
105 105 int irq;
106 106  
107   - printk(KERN_DEBUG "===> %s: %s slot=%x, pin=%x\n", __FUNCTION__,
108   - pci_name(dev), slot, pin);
  107 + dev_dbg(&dev->dev, "%s: slot=%x, pin=%x\n", __FUNCTION__, slot, pin);
109 108  
110 109 irq = it8152_pci_map_irq(dev, slot, pin);
111 110 if (irq)
112 111  
113 112  
... ... @@ -141,14 +140,13 @@
141 140 return(0);
142 141 }
143 142  
144   -static struct pci_bus * __init
145   -cmx270_pci_scan_bus(int nr, struct pci_sys_data *sys)
  143 +static void cmx270_pci_preinit(void)
146 144 {
147   - printk(KERN_INFO "Initializing CM-X270 PCI subsystem\n");
  145 + pr_info("Initializing CM-X270 PCI subsystem\n");
148 146  
149 147 __raw_writel(0x800, IT8152_PCI_CFG_ADDR);
150 148 if (__raw_readl(IT8152_PCI_CFG_DATA) == 0x81521283) {
151   - printk(KERN_INFO "PCI Bridge found.\n");
  149 + pr_info("PCI Bridge found.\n");
152 150  
153 151 /* set PCI I/O base at 0 */
154 152 writel(0x848, IT8152_PCI_CFG_ADDR);
... ... @@ -163,7 +161,7 @@
163 161 /* CardBus Controller on ATXbase baseboard */
164 162 writel(0x4000, IT8152_PCI_CFG_ADDR);
165 163 if (readl(IT8152_PCI_CFG_DATA) == 0xAC51104C) {
166   - printk(KERN_INFO "CardBus Bridge found.\n");
  164 + pr_info("CardBus Bridge found.\n");
167 165  
168 166 /* Configure socket 0 */
169 167 writel(0x408C, IT8152_PCI_CFG_ADDR);
... ... @@ -196,7 +194,6 @@
196 194 writel(0xb0000000, IT8152_PCI_CFG_DATA);
197 195 }
198 196 }
199   - return it8152_pci_scan_bus(nr, sys);
200 197 }
201 198  
202 199 static struct hw_pci cmx270_pci __initdata = {
... ... @@ -204,7 +201,8 @@
204 201 .map_irq = cmx270_pci_map_irq,
205 202 .nr_controllers = 1,
206 203 .setup = it8152_pci_setup,
207   - .scan = cmx270_pci_scan_bus,
  204 + .scan = it8152_pci_scan_bus,
  205 + .preinit = cmx270_pci_preinit,
208 206 };
209 207  
210 208 static int __init cmx270_init_pci(void)