summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* drivers/base/power/: make 2 functions staticAdrian Bunk2007-10-123-8/+2Star
| | | | | | | | | suspend_device() and resume_device() can now become static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Fix Firmware class name collisionMarkus Rechberger2007-10-121-2/+1Star
| | | | | | | | | | | | | | | following patch fixes the i2c name collision with i2c-dev. http://mcentral.de/wiki/index.php/Bugtracker#i2c_core_problem This issue has been experienced with em28xx and saa7133 based devices. I discussed that problem with Jean Delvare a while ago and he proposed to add a prefix to the class name. Signed-off-by: Markus Rechberger <markus.rechberger@amd.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: add uevent file for bus and driverKay Sievers2007-10-121-0/+35
| | | | | | | | This has been in the SuSE kernels for some time now. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: exclude kobject_uevent.c for !CONFIG_HOTPLUGKay Sievers2007-10-121-14/+4Star
| | | | | | | | | | Move uevent specific logic from the core into kobject_uevent.c, which does no longer require to link the unused string array if hotplug is not compiled in. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Convert from class_device to device in drivers/chartonyj@suse.de2007-10-1211-39/+32Star
| | | | | | | | | | Convert from class_device to device in drivers/char. Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Convert from class_device to device for drivers/videotonyj@suse.de2007-10-122-15/+18
| | | | | | | | | | Convert from class_device to device for drivers/video. Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* dmi-id: Possible cleanupJean Delvare2007-10-121-5/+2Star
| | | | | | | | | | The DEFINE_DMI_ATTR macro has a single user left so we can expand it for slightly shorter/simpler code. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* dmi-id: Use dynamic sysfs attributesJean Delvare2007-10-121-12/+26
| | | | | | | | | | | | We can use sysfs attributes with an extra parameter for dmi id attributes. This makes it possible to use the same callback function for all attributes, reducing the binary size significantly (-18% on x86_64.) Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Drivers: clean up direct setting of the name of a ksetGreg Kroah-Hartman2007-10-122-4/+5
| | | | | | | | | | | | A kset should not have its name set directly, so dynamically set the name at runtime. This is needed to remove the static array in the kobject structure which will be changed in a future patch. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* cdev: remove unneeded setting of cdev namesGreg Kroah-Hartman2007-10-123-12/+4Star
| | | | | | | | | | struct cdev does not need the kobject name to be set, as it is never used. This patch fixes up the few places it is set. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* kobjects: fix up improper use of the kobject name fieldGreg Kroah-Hartman2007-10-125-6/+5Star
| | | | | | | A number of different drivers incorrect access the kobject name field directly. This is not correct as the name might not be in the array. Use the proper accessor function instead.
* Driver core: remove get_bus()Greg Kroah-Hartman2007-10-122-13/+12Star
| | | | | | | | | | get_bus() should not be globally visable as it is not used by anything other than drivers/base/bus.c. This patch removes the visability of it, and renames it to match all of the other *_get() functions in the kernel. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: remove put_bus()Greg Kroah-Hartman2007-10-122-16/+14Star
| | | | | | | | | | put_bus() should not be globally visable as it is not used by anything other than drivers/base/bus.c. This patch removes the visability of it, and renames it to match all of the other *_put() functions in the kernel. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: remove subsys_get()Greg Kroah-Hartman2007-10-122-2/+2
| | | | | | | | There are no more subsystems, it's a kset now so remove the function and the only two users, which are in the driver core. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: remove subsys_put()Greg Kroah-Hartman2007-10-122-2/+2
| | | | | | | | There are no more subsystems, it's a kset now so remove the function and the only two users, which are in the driver core. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: remove kset_set_kset_sGreg Kroah-Hartman2007-10-121-1/+1
| | | | | | | | | This macro is only used by the driver core and is held over from when we had subsystems. It is not needed anymore. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: remove subsys_set_ksetGreg Kroah-Hartman2007-10-122-2/+3
| | | | | | | | | This macro is only used by the driver core and is held over from when we had subsystems. It is not needed anymore. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: add CONFIG_UEVENT_HELPER_PATHKay Sievers2007-10-121-0/+8
| | | | | | | | | | | | | The kernel creates a process for every event that is send, even when there is no binary it could execute. We are needlessly creating around 200-300 failing processes during early bootup, until we have the chance to disable it from userspace. This change allows us to disable /sbin/hotplug entirely, if you want to, by setting UEVENT_HELPER_PATH="" in the kernel config. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: change add_uevent_var to use a structKay Sievers2007-10-1234-415/+175Star
| | | | | | | | | | | | | | | | | | This changes the uevent buffer functions to use a struct instead of a long list of parameters. It does no longer require the caller to do the proper buffer termination and size accounting, which is currently wrong in some places. It fixes a known bug where parts of the uevent environment are overwritten because of wrong index calculations. Many thanks to Mathieu Desnoyers for finding bugs and improving the error handling. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: make sysfs uevent-attributes staticKay Sievers2007-10-121-12/+9Star
| | | | | | | | | | Attributes do not have an owner(module) anymore, so there is no need to carry the attributes in every single bus instance. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Acked-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* platform: prefix MODALIAS with "platform:"Kay Sievers2007-10-124-15/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Prefix platform modalias strings with "platform:", which modprobe config to blacklist alias resolving if userspace configures it. Send uevents for all platform devices. Add MODULE_ALIAS's to: pxa2xx_pcmcia, ds1742 and pcspkr to trigger module autoloading by userspace. $ modinfo pcspkr alias: platform:pcspkr license: GPL description: PC Speaker beeper driver ... $ modprobe -n -v platform:pcspkr insmod /lib/modules/2.6.23-rc3-g28e8351a-dirty/kernel/drivers/input/misc/pcspkr.ko Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: David Brownell <david-b@pacbell.net> Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [TG3]: Fix APE induced regressionMatt Carlson2007-10-121-3/+4
| | | | | | | | This patch fixes a bug caused by the recent APE support added for 5761 devices. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SKY2]: version 1.19Stephen Hemminger2007-10-121-1/+1
| | | | | | | Update version to keep track of new changes. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SKY2]: use netdevice stats structStephen Hemminger2007-10-122-22/+13Star
| | | | | | | Use builtin statistics structure from net device. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SKY2]: fiber advertise bits initialization (trivial)Stephen Hemminger2007-10-121-2/+2
| | | | | | | Put initialization in sequential order (same as other constants). Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SKY2]: fix power settings on Yukon XLStephen Hemminger2007-10-121-7/+6Star
| | | | | | | Make sure PCI register for PHY power gets set correctly. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SKY2]: ethtool register reserved area blackoutStephen Hemminger2007-10-121-9/+53
| | | | | | | | | | | | | Make sure and not dump reserved areas of device space. Touching some of these causes machine check exceptions on boards like D-Link DGE-550SX. Coding note, used a complex switch statement rather than bitmap because it is easier to relate the block values to the documentation rather than looking at a encoded bitmask. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵Linus Torvalds2007-10-1231-883/+1449
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (408 commits) [POWERPC] Add memchr() to the bootwrapper [POWERPC] Implement logging of unhandled signals [POWERPC] Add legacy serial support for OPB with flattened device tree [POWERPC] Use 1TB segments [POWERPC] XilinxFB: Allow fixed framebuffer base address [POWERPC] XilinxFB: Add support for custom screen resolution [POWERPC] XilinxFB: Use pdata to pass around framebuffer parameters [POWERPC] PCI: Add 64-bit physical address support to setup_indirect_pci [POWERPC] 4xx: Kilauea defconfig file [POWERPC] 4xx: Kilauea DTS [POWERPC] 4xx: Add AMCC Kilauea eval board support to platforms/40x [POWERPC] 4xx: Add AMCC 405EX support to cputable.c [POWERPC] Adjust TASK_SIZE on ppc32 systems to 3GB that are capable [POWERPC] Use PAGE_OFFSET to tell if an address is user/kernel in SW TLB handlers [POWERPC] 85xx: Enable FP emulation in MPC8560 ADS defconfig [POWERPC] 85xx: Killed <asm/mpc85xx.h> [POWERPC] 85xx: Add cpm nodes for 8541/8555 CDS [POWERPC] 85xx: Convert mpc8560ads to the new CPM binding. [POWERPC] mpc8272ads: Remove muram from the CPM reg property. [POWERPC] Make clockevents work on PPC601 processors ... Fixed up conflict in Documentation/powerpc/booting-without-of.txt manually.
| * [POWERPC] XilinxFB: Allow fixed framebuffer base addressGrant Likely2007-10-121-6/+16
| | | | | | | | | | | | | | | | Allow a fixed framebuffer address to be assigned to the framebuffer device instead of allocating the framebuffer from the consistent memory pool. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * [POWERPC] XilinxFB: Add support for custom screen resolutionGrant Likely2007-10-121-26/+45
| | | | | | | | | | | | | | | | | | Some custom implementations of the xilinx fb can use resolutions other than 640x480. This patch allows the resolution to be specified in the device tree or the xilinx_platform_data structure. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * [POWERPC] XilinxFB: Use pdata to pass around framebuffer parametersGrant Likely2007-10-121-20/+23
| | | | | | | | | | | | | | | | | | | | The call to xilinxfb_assign is getting unwieldy when adding features to the Xilinx framebuffer driver. Change xilinxfb_assign() to accept a pointer to a xilinxfb_platform_data structure to prepare for adding additition configuration options. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * Merge branch 'virtex-for-2.6.24' of ↵Josh Boyer2007-10-111-80/+199
| |\ | | | | | | | | | git://git.secretlab.ca/git/linux-2.6-virtex into for-2.6.24-4xx
| | * [POWERPC] XilinxFB: sparse fixesGrant Likely2007-10-101-3/+3
| | | | | | | | | | | | Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * [POWERPC] XilinxFB: Make missing pdata structure non-fatalGrant Likely2007-10-101-12/+10Star
| | | | | | | | | | | | | | | | | | | | | Missing pdata structure is not a fatal error. The device can still be initialized without it. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * [POWERPC] XilinxFB: add of_platform bus bindingGrant Likely2007-10-101-9/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the of_platform bus binding to the xilinxfb driver. Needed to use framebuffer devices described in the OF device tree (used by arch/powerpc). Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Andrei Konovalov <akonovalov@ru.mvista.com>
| | * [POWERPC] XilinxFB: cleanup platform_bus binding to use platform bus API.Grant Likely2007-10-101-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | Change the platform bus binding to make use of the established platform_bus API. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Andrei Konovalov <akonovalov@ru.mvista.com>
| | * [POWERPC] XilinxFB: Split device setup from bus bindingGrant Likely2007-10-101-53/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | Split the device setup code away from the platform bus binding. This is in preparation for adding the of_platform bus binding to this driver and most of the setup code is common between the two busses. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Andrei Konovalov <akonovalov@ru.mvista.com>
| | * [POWERPC] XilinxFB: rename failout labels to reflect failureGrant Likely2007-10-101-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Labels and gotos are used in xilinxfb_assign to unwind allocations on device registration failures. Rename the labels to reflect the error which occured. This change is being made to make it easier to add new failout paths (which occurs in a subsuquent patch) and to make reviewing the failout path easier. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Andrei Konovalov <akonovalov@ru.mvista.com>
| | * [POWERPC] XilinxFB: Replace calls to printk with dev_dbg, dev_err, etc.Grant Likely2007-10-101-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The dev_dbg, dev_err, etc functions provide more context that plain vanilla printk which is useful for debugging. Where appropriate, change printk calls to the appropriate dev_*() call. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Andrei Konovalov <akonovalov@ru.mvista.com>
| | * [POWERPC] XilinxFB: add banner output to probe routine when DEBUG is definedGrant Likely2007-10-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Debug support: when DEBUG is defined, output relevant details to the log about the framebuffer registration. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Andrei Konovalov <akonovalov@ru.mvista.com>
| * | [POWERPC] iSeries: Move viodasd probingStephen Rothwell2007-10-111-52/+25Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way we only have entries in the device tree for disks that actually exist. A slight complication is that disks may be attached to LPARs at runtime. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * | [POWERPC] iSeries: Move detection of virtual tapesStephen Rothwell2007-10-111-106/+18Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now we will only have entries in the device tree for the actual existing devices (including their OS/400 properties). This way viotape.c gets all the information about the devices from the device tree. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * | [POWERPC] iSeries: Move detection of virtual cdromsStephen Rothwell2007-10-111-97/+19Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we will only have entries in the device tree for the actual existing devices (including their OS/400 properties). This way viocd.c gets all the information about the devices from the device tree. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * | [POWERPC] Remove iSeries_vio_devStephen Rothwell2007-10-112-7/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was only being used to carry around dma_iommu_ops and vio_iommu_table which we can use directly instead. This also means that vio_bus_device doesn't need to refer to them either. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * | [POWERPC] iSeries: Simplify viocd initialisationStephen Rothwell2007-10-111-24/+13Star
| |/ | | | | | | | | | | | | | | | | We don't need to keep a lump of dma coherent memory around for the life of the module. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * [POWERPC] qe: miscellaneous code improvements and fixes to the QE libraryTimur Tabi2007-10-082-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes numerous miscellaneous code improvements to the QE library. 1. Remove struct ucc_common and merge ucc_init_guemr() into ucc_set_type() (every caller of ucc_init_guemr() also calls ucc_set_type()). Modify all callers of ucc_set_type() accordingly. 2. Remove the unused enum ucc_pram_initial_offset. 3. Refactor qe_setbrg(), also implement work-around for errata QE_General4. 4. Several printk() calls were missing the terminating \n. 5. Add __iomem where needed, and change u16 to __be16 and u32 to __be32 where appropriate. 6. In ucc_slow_init() the RBASE and TBASE registers in the PRAM were programmed with the wrong value. 7. Add the protocol type to struct us_info and updated ucc_slow_init() to use it, instead of always programming QE_CR_PROTOCOL_UNSPECIFIED. 8. Rename ucc_slow_restart_x() to ucc_slow_restart_tx() 9. Add several macros in qe.h (mostly for slow UCC support, but also to standardize some naming convention) and remove several unused macros. 10. Update ucc_geth.c to use the new macros. 11. Add ucc_slow_info.protocol to specify which QE_CR_PROTOCOL_xxx protcol to use when initializing the UCC in ucc_slow_init(). 12. Rename ucc_slow_pram.rfcr to rbmr and ucc_slow_pram.tfcr to tbmr, since these are the real names of the registers. 13. Use the setbits, clrbits, and clrsetbits where appropriate. 14. Refactor ucc_set_qe_mux_rxtx(). 15. Remove all instances of 'volatile'. 16. Simplify get_cmxucr_reg(); 17. Replace qe_mux.cmxucrX with qe_mux.cmxucr[]. 18. Updated struct ucc_geth because struct ucc_fast is not padded any more. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * [POWERPC] cpm: Describe multi-user ram in its own device node.Scott Wood2007-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way the current CPM binding describes available multi-user (a.k.a. dual-ported) RAM doesn't work well when there are multiple free regions, and it doesn't work at all if the region doesn't begin at the start of the muram area (as the hardware needs to be programmed with offsets into this area). The latter situation can happen with SMC UARTs on CPM2, as its parameter RAM is relocatable, u-boot puts it at zero, and the kernel doesn't support moving it. It is now described with a muram node, similar to QE. The current CPM binding is sufficiently recent (i.e. never appeared in an official release) that compatibility with existing device trees is not an issue. The code supporting the new binding is shared between cpm1 and cpm2, rather than remain separated. QE should be able to use this code as well, once minor fixes are made to its device trees. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * [POWERPC] cpm_uart: Issue STOP_TX command before initializing console.Scott Wood2007-10-041-0/+3
| | | | | | | | | | | | | | This prevents some bootloader/bootwrapper characters from being lost. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * [POWERPC] cpm_uart: sparse fixesScott Wood2007-10-046-183/+192
| | | | | | | | | | | | | | | | Mostly a bunch of direct access to in/out conversions, plus a few cast removals, __iomem annotations, and miscellaneous cleanup. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * [POWERPC] cpm_uart: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING ↵Scott Wood2007-10-046-25/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is set. The existing OF glue code was crufty and broken. Rather than fix it, it has been removed, and the serial driver now talks to the device tree directly. The non-CONFIG_PPC_CPM_NEW_BINDING code can go away once CPM platforms are dropped from arch/ppc (which will hopefully be soon), and existing arch/powerpc boards that I wasn't able to test on for this patchset get converted (which should be even sooner). Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>