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

Commit 3c06806e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents d9f73afc fa32154e
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -57,7 +57,7 @@ static struct clk *mpc5121_clk_get(struct device *dev, const char *id)
	int id_match = 0;
	int id_match = 0;


	if (dev == NULL || id == NULL)
	if (dev == NULL || id == NULL)
		return NULL;
		return clk;


	mutex_lock(&clocks_mutex);
	mutex_lock(&clocks_mutex);
	list_for_each_entry(p, &clocks, node) {
	list_for_each_entry(p, &clocks, node) {
+6 −3
Original line number Original line Diff line number Diff line
@@ -99,7 +99,7 @@ static void __init efika_pcisetup(void)
	if (bus_range == NULL || len < 2 * sizeof(int)) {
	if (bus_range == NULL || len < 2 * sizeof(int)) {
		printk(KERN_WARNING EFIKA_PLATFORM_NAME
		printk(KERN_WARNING EFIKA_PLATFORM_NAME
		       ": Can't get bus-range for %s\n", pcictrl->full_name);
		       ": Can't get bus-range for %s\n", pcictrl->full_name);
		return;
		goto out_put;
	}
	}


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


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


	hose->first_busno = bus_range[0];
	hose->first_busno = bus_range[0];
@@ -124,6 +124,9 @@ static void __init efika_pcisetup(void)
	hose->ops = &rtas_pci_ops;
	hose->ops = &rtas_pci_ops;


	pci_process_bridge_OF_ranges(hose, pcictrl, 0);
	pci_process_bridge_OF_ranges(hose, pcictrl, 0);
	return;
out_put:
	of_node_put(pcictrl);
}
}


#else
#else
+6 −2
Original line number Original line Diff line number Diff line
@@ -325,12 +325,16 @@ int mpc5200_psc_ac97_gpio_reset(int psc_number)
	clrbits32(&simple_gpio->simple_dvo, sync | out);
	clrbits32(&simple_gpio->simple_dvo, sync | out);
	clrbits8(&wkup_gpio->wkup_dvo, reset);
	clrbits8(&wkup_gpio->wkup_dvo, reset);


	/* wait at lease 1 us */
	/* wait for 1 us */
	udelay(2);
	udelay(1);


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


	/* wait at least 200ns */
	/* 7 ~= (200ns * timebase) / ns2sec */
	__delay(7);

	/* Restore pin-muxing */
	/* Restore pin-muxing */
	out_be32(&simple_gpio->port_config, mux);
	out_be32(&simple_gpio->port_config, mux);