- Feb 27, 2010
-
-
Finn Thain authored
The valkyriefb driver needs the CUDA to work in order to set the video mode at boot. So initialise the device earlier, and bring the m68k code closer to the powermac code. Signed-off-by:
Finn Thain <fthain@telegraphics.com.au> Signed-off-by:
Geert Uytterhoeven <geert@linux-m68k.org>
-
- Feb 09, 2010
-
-
Grant Likely authored
machine is compatible is an OF-specific call. It should have the of_ prefix to protect the global namespace. Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Acked-by:
Michal Simek <monstr@monstr.eu>
-
- Feb 08, 2010
-
-
Frans Pop authored
Signed-off-by:
Frans Pop <elendil@planet.nl> Cc: linuxppc-dev@ozlabs.org Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Feb 02, 2010
-
-
Jean Delvare authored
Looking at drivers/macintosh/therm_adt746x.c, the sysfs files are created in thermostat_init() and removed in thermostat_exit(), which are the driver's init and exit functions. These files are backed-up by a per-device structure, so it looks like the wrong thing to do: the sysfs files have a lifetime longer than the data structure that is backing it up. I think that sysfs files creation should be moved to the end of probe_thermostat() and sysfs files removal should be moved to the beginning of remove_thermostat(). Signed-off-by:
Jean Delvare <khali@linux-fr.org> Tested-by:
Christian Kujau <lists@nerdbynature.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Colin Leroy <colin@colino.net> Cc: stable@kernel.org Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Jan 14, 2010
-
-
Márton Németh authored
The match_table field of the struct of_device_id is constant in <linux/of_platform.h> so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/ ) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by:
Márton Németh <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Dec 08, 2009
-
-
Darrick J. Wong authored
In commit 0512a9a8, we unilaterally zero the "pwm invert" bit in the fan behavior configuration register. On my PowerBook G4, this results in the fans going to full speed at low temperature and shutting off at high temperature because the pwm invert bit is supposed to be set. Therefore, record the pwm invert bit at driver load time, and write the bit into the fan behavior control register. This restores correct behavior on my PBG4 and should work around the bit being set to the wrong value after suspend/resume (which is what the original patch was trying to fix). It also fixes a minor omission where the pwm invert bit correction is NOT performed when switching into automatic mode. Signed-off-by:
Darrick J. Wong <djwong@us.ibm.com> CC: <stable@kernel.org> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Benjamin Herrenschmidt authored
The hotplug mediabay has tendrils deep into drivers/ide code which makes a libata port reather difficult. In addition it's ugly and could be done better. This reworks the interface between the mediabay and the rest of the world so that: - Any macio_driver can now have a mediabay_event callback which will be called when that driver sits on a mediabay and it's been either plugged or unplugged. The device type is passed as an argument. We can now move all the IDE cruft into the IDE driver itself - A check_media_bay() function can be used to take a peek at the type of device currently in the bay if any, a cleaner variant of the previous function with the same name. - A pair of lock/unlock functions are exposed to allow the IDE driver to block the hotplug callbacks during the initial setup and probing of the bay in order to avoid nasty race conditions. - The mediabay code no longer needs to spin on the status register of the IDE interface when it detects an IDE device, this is done just fine by the IDE code itself Overall, less code, simpler, and allows for another driver than our old drivers/ide based one. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Dec 07, 2009
-
-
Benjamin Herrenschmidt authored
This adds dma_parms to macio devices and initializes them with default values. This will allow pata_macio to setup the appropriate max segment size for the block layer. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Benjamin Herrenschmidt authored
This adds some basic devres support. When enabled via macio_enable_devres() resources requested by drivers will be automatically released. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Bolko Maass authored
Windfarm SMU control is explicitly missing support for a second CPU pump in G5 PowerMacs. Such machines actually exist (specifically Quads with a second pump), so this patch adds detection for it. Signed-off by: Bolko Maass <bmaass@math.uni-bremen.de> CC: <stable@kernel.org> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Alexey Dobriyan authored
Signed-off-by:
Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Dec 04, 2009
-
-
André Goddard Rosa authored
That is "success", "unknown", "through", "performance", "[re|un]mapping" , "access", "default", "reasonable", "[con]currently", "temperature" , "channel", "[un]used", "application", "example","hierarchy", "therefore" , "[over|under]flow", "contiguous", "threshold", "enough" and others. Signed-off-by:
André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Nov 23, 2009
-
-
Thomas Gleixner authored
Drop the bkl from nvram_llseek() as it obviously protects nothing. The file offset is safe in essence. The ioctl can be converted to unlocked_ioctl because it just calls pmac_get_partition() which reads a value from an array which was initialized at early boot time. No need for serialization. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: linuxppc-dev@ozlabs.org Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Nov 18, 2009
-
-
Eric W. Biederman authored
For consistency drop & in front of every proc_handler. Explicity taking the address is unnecessary and it prevents optimizations like stubbing the proc_handlers to NULL. Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Joe Perches <joe@perches.com> Signed-off-by:
Eric W. Biederman <ebiederm@xmission.com>
-
- Nov 12, 2009
-
-
Eric W. Biederman authored
Now that sys_sysctl is a wrapper around /proc/sys all of the binary sysctl support elsewhere in the tree is dead code. Cc: Jens Axboe <axboe@kernel.dk> Cc: Corey Minyard <minyard@acm.org> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Matt Mackall <mpm@selenic.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Neil Brown <neilb@suse.de> Cc: "James E.J. Bottomley" <James.Bottomley@suse.de> Acked-by: Clemens Ladisch <clemens@ladisch.de> for drivers/char/hpet.c Signed-off-by:
Eric W. Biederman <ebiederm@xmission.com>
-
- Oct 30, 2009
-
-
Jean Delvare authored
The ADT746x don't have any register at sub-address 0, so better use an existing register for the initial test read. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Cc: Colin Leroy <colin@colino.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Oct 14, 2009
-
-
Thomas Gleixner authored
The ans-lcd driver got the cycle_kernel_lock() in anslcd_open() from the BKL pushdown and it still uses the locked ioctl. The BKL serialization in this driver is more than obscure and definitely does not cover all possible corner cases. Protect the access to the hardware with a local mutex and get rid of BKL and locked ioctl. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <20091010153349.966159859@linutronix.de> Acked-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Oct 13, 2009
-
-
Benjamin Herrenschmidt authored
Since the change of how interrupts are disabled during suspend, certain PowerBook models started exhibiting various issues during suspend or resume from sleep. I finally tracked it down to the code that runs various "platform" functions (kind of little scripts extracted from the device-tree), which uses our i2c and PMU drivers expecting interrutps to work, and at a time where with the new scheme, they have been disabled. This causes timeouts internally which for some reason results in the PMU being unable to see the trackpad, among other issues, really it depends on the machine. Most of the time, we fail to properly adjust some clocks for suspend/resume so the results are not always predictable. This patch fixes it by using IRQF_TIMER for both the PMU and the I2C interrupts. I prefer doing it this way than moving the call sites since I really want those platform functions to still be called after all drivers (and before sysdevs). We also do a slight cleanup to via-pmu.c driver to make sure the ADB autopoll mask is handled correctly when doing bus resets Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Oct 04, 2009
-
-
Jean Delvare authored
If i2c device probing fails, then there is no driver to dereference after calling i2c_new_device(). Stop assuming that probing will always succeed, to avoid NULL pointer dereferences. We have an easier access to the driver anyway. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Tested-by:
Tim Shepard <shep@alum.mit.edu> Cc: Colin Leroy <colin@colino.net>
-
- Sep 21, 2009
-
-
Joe Perches authored
Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Sep 07, 2009
-
-
Olaf Hering authored
This is needed to get kde-powersave to work properly on some g4 powerbooks. From: Olaf Hering <olh@suse.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by:
Richard Purdie <rpurdie@linux.intel.com>
-
- Sep 01, 2009
-
-
Lyonel Vincent authored
On certain PowerMacs, a module (therm_windtunnel) controls various thermal settings (it can report CPU/case temperature, change speed of internal fans, etc.) By default, the hardware thermal control has a temperature limit to protect the computer from damages (the default limit seems to be 80°C) but therm_windtunnel.c reduces it to an anormaly low value (65°C), which means that he computer will shut down randomly when hit by direct sun light or during summer (summer in France can be quite hot), actually possibly losing data instead of protecting it. The overheat limit in therm_windtunnel.c:253-254 should be set to 75°C and 70°C instead of 65°C and 60°C respectively. From: Lyonel Vincent <lyonel@ezix.org> Signed-off-by:
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Aug 26, 2009
-
-
Roel Kluin authored
With while (count++ < 50) { ... } count can reach 51, not 50, so we shouldn't give an error message on a count of 50. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by:
Roel Kluin <roel.kluin@gmail.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Geert Uytterhoeven <geert@linux-m68k.org>
-
- Aug 19, 2009
-
-
roel kluin authored
Check whether index is within bounds before grabbing the element. Signed-off-by:
Roel Kluin <roel.kluin@gmail.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Jun 25, 2009
-
-
Benjamin Herrenschmidt authored
The macio_dev's created to map devices inside the MacIO ASICs don't have proper dma_ops. This causes crashes on some machines since the SCSI code calls dma_map_* on our behalf using the device we hang from. This fixes it by copying the parent PCI device dma_ops into the macio_dev when creating it. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Jun 15, 2009
-
-
Jean Delvare authored
The legacy i2c binding model is going away soon, so convert the ppc therm_windtunnel driver to the new model or it will break. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org>
-
Jean Delvare authored
The legacy i2c binding model is going away soon, so convert the ppc therm_adt746x driver to the new model or it will break. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Tested-by:
Andreas Schwab <schwab@linux-m68k.org> Tested-by:
Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Jean Delvare authored
The legacy i2c binding model is going away soon, so convert the macintosh windfarm drivers to the new model or they will break. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Tested-by:
Johannes Berg <johannes@sipsolutions.net> Tested-by:
Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Jean Delvare authored
The legacy i2c binding model is going away soon, so convert the macintosh therm_pm72 driver to the new model or it will break. This is really a quick and dirty conversion, that should do the trick for now, but no doubt that something cleaner can be done if anyone is interested. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Tested-by:
Paul Mackerras <paulus@samba.org>
-
- Jun 01, 2009
-
-
Michel Dänzer authored
This bit would get enabled sometimes (probably after suspend/resume), so the fan would run at full speed below the temperature thresholds, but slow down and eventually stop if temperatures rose above the thresholds... not exactly what you want. Signed-off-by:
Michel Dänzer <michel@daenzer.net> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Apr 22, 2009
-
-
Bartlomiej Zolnierkiewicz authored
On Tuesday 14 April 2009 20:31:21 Subrata Modak wrote: > Observed the following build error: > --- > CC drivers/macintosh/mediabay.o > In file included from drivers/macintosh/mediabay.c:21: > include/linux/ide.h:605: error: field ‘request_sense_rq’ has incomplete > type > make[2]: *** [drivers/macintosh/mediabay.o] Error 1 > make[1]: *** [drivers/macintosh] Error 2 > make: *** [drivers] Error 2 > --- mediabay shouldn't include <linux/ide.h> unconditionally so remove the superfluous include from mediabay.c (<asm/mediabay.h> will pull <linux/ide.h> in for CONFIG_BLK_DEV_IDE_PMAC=y). Reported-by:
Subrata Modak <subrata@linux.vnet.ibm.com> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by:
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-
- Apr 21, 2009
-
-
Bartlomiej Zolnierkiewicz authored
Now that the powermac IDE host driver can be modular, we need to export check_media_bay_by_base() and media_bay_set_ide_infos() from drivers/macintosh/mediabay.c for it. This fixes the following build error: > CC [M] drivers/ide/pmac.o > drivers/ide/pmac.c: In function ‘pmac_ide_init_dev’: > drivers/ide/pmac.c:955: error: implicit declaration of function > ‘check_media_bay_by_base’ > drivers/ide/pmac.c: In function ‘pmac_ide_setup_device’: > drivers/ide/pmac.c:1090: error: implicit declaration of function > ‘media_bay_set_ide_infos’ > make[2]: *** [drivers/ide/pmac.o] Error 1 > make[1]: *** [drivers/ide] Error 2 > make: *** [drivers] Error 2 Reported-by:
Subrata Modak <subrata@linux.vnet.ibm.com> Signed-off-by:
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Alexander Beregalov authored
Fixes this build error: In file included from drivers/macintosh/mediabay.c:21: include/linux/ide.h:605: error: field 'request_sense_rq' has incomplete type Signed-off-by:
Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
- Feb 10, 2009
-
-
roel kluin authored
As suggested, this is used for signed rather than unsigned Signed-off-by:
Roel Kluin <roel.kluin@gmail.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- Jan 06, 2009
-
-
Nicolas Palix authored
of_node_put is needed before discarding a value received from of_find_node_by_name, eg in error handling code or when the device node is no longer used. The semantic match that catches the bug is as follows: (http://www.emn.fr/x-info/coccinelle/ ) // <smpl> @r exists@ local idexpression struct device_node *n; position p1, p2; struct device_node *n1; statement S; identifier f; expression E; expression *ptr != NULL; @@ n@p1 = of_find_node_by_name(...) ... if (!n) S ... when != of_node_put(n) when != n1 = f(n,...) when != E = n when any when strict ( return \(0\|<+...n...+>\|ptr\); | return@p2 ...; | of_node_put(n); | n1 = f(n,...) | E = n ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s of_find_node_by_name %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by:
Nicolas Palix <npalix@diku.dk> Signed-off-by:
Julia Lawall <julia@diku.dk> Acked-by:
Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Kay Sievers authored
Signed-off-by:
Kay Sievers <kay.sievers@vrfy.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Frederik Schwarzer authored
It is always "an" if there is a vowel _spoken_ (not written). So it is: "an hour" (spoken vowel) but "a uniform" (spoken 'j') Signed-off-by:
Frederik Schwarzer <schwarzerf@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Dec 28, 2008
-
-
Finn Thain authored
Remove some more cruft from machw.h and drop the #include where it isn't needed. Signed-off-by:
Finn Thain <fthain@telegraphics.com.au> Signed-off-by:
Geert Uytterhoeven <geert@linux-m68k.org>
-
- Dec 20, 2008
-
-
Benjamin Herrenschmidt authored
This splits the mmu_context handling between 32-bit hash based processors, 64-bit hash based processors and everybody else. This is preliminary work for adding SMP support for BookE processors. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by:
Kumar Gala <galak@kernel.crashing.org> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
- Dec 03, 2008
-
-
roel kluin authored
i2c_smbus_read_word_data() returns a s32, which may be negative but unsigned len cannot be negative. Signed-off-by:
Roel Kluin <roel.kluin@gmail.com> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-