Skip to content

Commit 3c06806

Browse files
committed
Merge branch 'merge-powerpc' of git://git.secretlab.ca/git/linux-2.6
* 'merge-powerpc' of git://git.secretlab.ca/git/linux-2.6: powerpc/5200: tighten up ac97 reset timing powerpc/5200: efika.c: Add of_node_put to avoid memory leak powerpc/512x: fix clk_get() return value
2 parents d9f73af + fa32154 commit 3c06806

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

arch/powerpc/platforms/512x/clock.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static struct clk *mpc5121_clk_get(struct device *dev, const char *id)
5757
int id_match = 0;
5858

5959
if (dev == NULL || id == NULL)
60-
return NULL;
60+
return clk;
6161

6262
mutex_lock(&clocks_mutex);
6363
list_for_each_entry(p, &clocks, node) {

arch/powerpc/platforms/52xx/efika.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static void __init efika_pcisetup(void)
9999
if (bus_range == NULL || len < 2 * sizeof(int)) {
100100
printk(KERN_WARNING EFIKA_PLATFORM_NAME
101101
": Can't get bus-range for %s\n", pcictrl->full_name);
102-
return;
102+
goto out_put;
103103
}
104104

105105
if (bus_range[1] == bus_range[0])
@@ -111,19 +111,22 @@ static void __init efika_pcisetup(void)
111111
printk(" controlled by %s\n", pcictrl->full_name);
112112
printk("\n");
113113

114-
hose = pcibios_alloc_controller(of_node_get(pcictrl));
114+
hose = pcibios_alloc_controller(pcictrl);
115115
if (!hose) {
116116
printk(KERN_WARNING EFIKA_PLATFORM_NAME
117117
": Can't allocate PCI controller structure for %s\n",
118118
pcictrl->full_name);
119-
return;
119+
goto out_put;
120120
}
121121

122122
hose->first_busno = bus_range[0];
123123
hose->last_busno = bus_range[1];
124124
hose->ops = &rtas_pci_ops;
125125

126126
pci_process_bridge_OF_ranges(hose, pcictrl, 0);
127+
return;
128+
out_put:
129+
of_node_put(pcictrl);
127130
}
128131

129132
#else

arch/powerpc/platforms/52xx/mpc52xx_common.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,16 @@ int mpc5200_psc_ac97_gpio_reset(int psc_number)
325325
clrbits32(&simple_gpio->simple_dvo, sync | out);
326326
clrbits8(&wkup_gpio->wkup_dvo, reset);
327327

328-
/* wait at lease 1 us */
329-
udelay(2);
328+
/* wait for 1 us */
329+
udelay(1);
330330

331331
/* Deassert reset */
332332
setbits8(&wkup_gpio->wkup_dvo, reset);
333333

334+
/* wait at least 200ns */
335+
/* 7 ~= (200ns * timebase) / ns2sec */
336+
__delay(7);
337+
334338
/* Restore pin-muxing */
335339
out_be32(&simple_gpio->port_config, mux);
336340

0 commit comments

Comments
 (0)