aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-24i2c-i801: Enable IRQ for byte_by_byte transactionsDaniel Kurtz1-7/+78
Byte-by-byte transactions are used primarily for accessing I2C devices with an SMBus controller. For these transactions, for each byte that is read or written, the SMBus controller generates a BYTE_DONE IRQ. The isr reads/writes the next byte, and clears the IRQ flag to start the next byte. On the penultimate IRQ, the isr also sets the LAST_BYTE flag. There is no locking around the cmd/len/count/data variables, since the I2C adapter lock ensures there is never multiple simultaneous transactions for the same device, and the driver thread never accesses these variables while interrupts might be occurring. The end result is faster I2C block read and write transactions. Note: This patch has only been tested and verified by doing I2C read and write block transfers on Cougar Point 6 Series PCH, as well as I2C read block transfers on ICH5. Signed-off-by: Daniel Kurtz <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-07-24i2c-i801: Enable interrupts on ICH5/7/8/9/10Jean Delvare1-4/+9
Enable interrupts on more devices. ICH5, ICH7(-M) and ICH10 have been tested to work OK. ICH8 and ICH9 are expected to work just fine as they are very close to ICH7 and ICH10. Ultimately we want to enable this feature on at least every device since the ICH5, but for now we limit the exposure. We'll enable it for other devices if we don't get negative feedback. As a bonus, let the user know when interrupts are used. Signed-off-by: Jean Delvare <[email protected]> Cc: Daniel Kurtz <[email protected]>
2012-07-24i2c-i801: Enable IRQ for SMBus transactionsDaniel Kurtz2-7/+105
Add a new 'feature' to i2c-i801 to enable using PCI interrupts. When the feature is enabled, then an isr is installed for the device's PCI IRQ. An I2C/SMBus transaction is always terminated by one of the following interrupt sources: FAILED, BUS_ERR, DEV_ERR, or on success: INTR. When the isr fires for one of these cases, it sets the ->status variable and wakes up the waitq. The waitq then saves off the status code, and clears ->status (in preparation for some future transaction). The SMBus controller generates an INTR irq at the end of each transaction where INTREN was set in the HST_CNT register. No locking is needed around accesses to priv->status since all writes to it are serialized: it is only ever set once in the isr at the end of a transaction, and cleared while no interrupts can occur. In addition, the I2C adapter lock guarantees that entire I2C transactions for a single adapter are always serialized. For this patch, the INTREN bit is set only for SMBus block, byte and word transactions, but not for I2C reads or writes. The use of the DS (BYTE_DONE) interrupt with byte-by-byte I2C transactions is implemented in a subsequent patch. The interrupt feature has only been enabled for COUGARPOINT hardware. In addition, it is disabled if SMBus is using the SMI# interrupt. Signed-off-by: Daniel Kurtz <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-07-24i2c-i801: Consolidate pollingJean Delvare1-55/+53
(Based on earlier work by Daniel Kurtz.) Come up with a consistent, driver-wide strategy for event polling. For intermediate steps of byte-by-byte block transactions, check for BYTE_DONE or any error flag being set. At the end of every transaction (regardless of PEC being used), check for both BUSY being cleared and INTR or any error flag being set. This ensures proper action for all transaction types. Signed-off-by: Jean Delvare <[email protected]> Cc: Daniel Kurtz <[email protected]>
2012-07-24i2c-i801: Drop ENABLE_INT9Daniel Kurtz1-5/+4
Later patches enable interrupts. This preliminary patch removes the older unsupported ENABLE_INT9 flag. Signed-off-by: Daniel Kurtz <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-07-24i2c-i801: Rename some SMBHSTCNT bit constantsDaniel Kurtz1-10/+11
Rename the SMBHSTCNT register bit access constants to match the style of other register bits. Signed-off-by: Daniel Kurtz <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-07-24i2c-i801: Check and return errors during byte-by-byte transfersDaniel Kurtz1-4/+6
If an error is detected in the polling loop, abort the transaction and return an error code. * DEV_ERR is set if the device does not respond with an acknowledge, and the SMBus controller times out (minimum 25ms). * BUS_ERR is set if a bus arbitration collision is detected. In other words, when the SMBus controller tries to generate a START condition, but detects that the SMBDATA is being held low, usually by another SMBus/I2C master. * FAILED is only set if a transaction is stopped by software (using the SMBHSTCNT KILL bit). Signed-off-by: Daniel Kurtz <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-07-24i2c-i801: Clear only status bits in HST_STSDaniel Kurtz1-1/+1
Writing back the whole status register could clear unwanted bits. In particular, it could clear the "INUSE_STS" bit, which is a 'hardware semaphore', that might be useful to use some day. To prepare for this, let's ban writing back the whole status to register HST_STS, of which this is the only instance. Signed-off-by: Daniel Kurtz <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-07-24i2c-i801: Refactor use of LAST_BYTE in i801_block_transaction_byte_by_byteDaniel Kurtz1-14/+14
As a slight optimization, pull some logic out of the polling loop during byte-by-byte transactions by just setting the I801_LAST_BYTE bit, as defined in the i801 (PCH) datasheet, when reading the last byte of a byte-by-byte I2C_SMBUS_READ. Signed-off-by: Daniel Kurtz <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-07-24i2c-smbus: Use module_i2c_driver()Fabio Estevam1-12/+1
Using module_i2c_driver() makes the code smaller and cleaner. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-07-24i2c/writing-clients: Mention module_i2c_driver()Jean Delvare1-8/+15
Based on a previous patch from Peter Meerwald. Signed-off-by: Jean Delvare <[email protected]> Acked-by: Peter Meerwald <[email protected]>
2012-07-24i2c-piix4: Support AMD auxiliary SMBus controllerAndrew Armenia3-4/+82
Some AMD chipsets, such as the SP5100, have an auxiliary SMBus controller with a second set of registers. This patch adds support for this auxiliary controller. Tested on ASUS KCMA-D8 motherboard. Signed-off-by: Andrew Armenia <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-07-24i2c-piix4: Separate registration and probing codeAndrew Armenia1-40/+71
Some chipsets have multiple sets of SMBus registers each controlling a separate SMBus. Supporting these chipsets properly will require registering multiple I2C adapters for one piix4. The code to initialize and register the i2c_adapter structure has been separated from piix4_probe and allows registration of a piix4 adapter given its base address. Note that the i2c_adapter and i2c_piix4_adapdata structures are now dynamically allocated. Signed-off-by: Andrew Armenia <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-07-24i2c-piix4: Eliminate piix4_smba global variableAndrew Armenia1-16/+34
Some chipsets have multiple sets of piix4-compatible SMBus registers. Eliminating the global variable will allow these chipsets to be fully supported. Return value from piix4_setup and piix4_sb800_setup now returns the smba value detected. This is stored in a struct i2c_piix4_adapdata. Thus the global variable is eliminated. Signed-off-by: Andrew Armenia <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-07-24i2c/busses: Use module_pci_driverAxel Lin16-200/+16
Convert the drivers in drivers/i2c/busses/* to usemodule_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Jean Delvare <[email protected]> Cc: Rudolf Marek <[email protected]> Cc: Olof Johansson <[email protected]> Cc: "Mark M. Hoffman" <[email protected]> Cc: Tomoya MORINAGA <[email protected]>
2012-07-24i2c: Update Guenter Roeck's e-mail addressGuenter Roeck2-2/+2
My old e-mail address won't be valid for much longer. Time to update it. Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2012-07-24Merge branch 'uhid' into for-linusJiri Kosina9-0/+1266
Conflicts: drivers/hid/Kconfig
2012-07-24Merge branches 'hidraw', 'magicmouse', 'multitouch', 'roccat', ↵Jiri Kosina32-550/+1697
'suspend-fixes' and 'upstream' into for-linus
2012-07-24Fix typo in include/linux/clk.h .Jan-Simon Möller1-2/+2
Signed-off-by: Jan-Simon Möller <[email protected]> Cc: Russell King <[email protected]> Cc: [email protected] Signed-off-by: Jiri Kosina <[email protected]>
2012-07-24pci: hotplug: Fix typo in pciMasanari Iida4-4/+4
Correct spelling typo in drivers/pci/hotplug. Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-07-24iommu: Fix typo in iommuMasanari Iida3-9/+9
Correct spelling typo in debug messages and comments in drivers/iommu. Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-07-24video: Fix typo in drivers/videoMasanari Iida13-19/+19
Correct spelling typo in debug messages and comments within drivers/video. Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-07-24genetlink: define lockdep_genl_is_held() when CONFIG_LOCKDEPWANG Cong2-2/+2
lockdep_is_held() is defined when CONFIG_LOCKDEP, not CONFIG_PROVE_LOCKING. Cc: "David S. Miller" <[email protected]> Cc: Jesse Gross <[email protected]> Signed-off-by: WANG Cong <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-24bf60x: fix build warningBob Liu4-10/+9
Fix several build warning while using bf609-ezkit_defconfig. Signed-off-by: Bob Liu <[email protected]>
2012-07-24PM: add BF60x flash suspend and resume supportSteven Miao1-1/+16
Signed-off-by: Steven Miao <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24blackfin: twi: read twi mmr via bfin_read macroSonic Zhang1-2/+2
Signed-off-by: Sonic Zhang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24dpm: deepsleep: reserve stackSteven Miao1-1/+1
Reserve 12 bytes on the stack for deepsleep use. Signed-off-by: Steven Miao <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf60x: cpufreq: fix anomaly 05000273Sonic Zhang1-1/+2
Anomaly 05000273 doesn't apply to bf60x. Signed-off-by: Sonic Zhang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf609: add adv7511 display supportScott Jiang1-11/+90
Signed-off-by: Scott Jiang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24blackfin: cplb-nompu: fix ROM cplb size for bf609-ezkitBob Liu1-0/+8
In user xip test, there is a cplb error when ROMKERNEL try to mount romfs using 'mount -t romfs /dev/mtdblock2 /mnt', becasue the CPLB setting is not correct. Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf60x: Add double fault, hardware error and NMI SEC handlerSonic Zhang2-1/+35
Signed-off-by: Sonic Zhang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf60x: update anomaly id in serial and twi driver headers.Sonic Zhang2-2/+2
Signed-off-by: Sonic Zhang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf60x: vs6624 pin updateVivi Li1-1/+3
Change ce pin to PE4 according to new adaptor board and re-define ppi for vs6624 to avoid gpio conflict. Signed-off-by: Vivi Li <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf60x: add default anomaly setting.Sonic Zhang1-0/+2
Signed-off-by: Sonic Zhang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf60x: update bf60x anomaly list.Sonic Zhang1-88/+56
Signed-off-by: Sonic Zhang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf60x: sec: Enable sec interrupt source priority configuration.Sonic Zhang5-1/+190
Customize the SEC interrupt priority array in machine ints-priority.c. Signed-off-by: Sonic Zhang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf60x: sec: Clean up interrupt initialization code for SEC.Sonic Zhang3-87/+125
Turn SEC related macro CONFIG_BF60x into SEC_GCTL. Move machine specific GPIO_PINT macros to machine gpio header. Split SEC init_arch_irq() and vec_to_irq() from old SIC. Signed-off-by: Sonic Zhang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf609: reuse bf5xx-i2s-pcm.c as i2s pcm driverScott Jiang1-2/+2
It's the same for both bf5xx and bf6xx soc. Signed-off-by: Scott Jiang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf561: add capabilities in adv7183_inputsScott Jiang1-0/+3
Add capabilities in adv7183_inputs to indicate that S_STD is supported. Signed-off-by: Scott Jiang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf609: convert vs6624 blank_clocks to black_pixelsScott Jiang1-1/+1
PPI driver has changed blank units from clocks to pixels. Signed-off-by: Scott Jiang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24blackfin: fix musb macro nameBob Liu2-4/+4
Musb can't work since the marco name has been changed. Signed-off-by: Bob Liu <[email protected]>
2012-07-24cleanup: sec and linkport only built on bf60xSteven Miao1-0/+2
Signed-off-by: Steven Miao <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bfin: pint: add pint suspend and resumeSteven Miao1-0/+4
Add pint suspend and resume if defined BFIN_GPIO_PINT. Signed-off-by: Steven Miao <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf60x: pm: add pint suspend and resume supportSteven Miao5-21/+76
save and restore pint sec CTL save and restore pint registers add pint suspend and resume when suspend to mem Signed-off-by: Steven Miao <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf609: add HDMI support for adv7842Scott Jiang1-7/+20
Signed-off-by: Scott Jiang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf609: add CVBS and S-Video support for adv7842Scott Jiang1-5/+18
Signed-off-by: Scott Jiang <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24gpiokeys: add gpio keyboard platform deviceSteven Miao1-0/+22
Signed-off-by: Steven Miao <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf60x: pm: pass wakeup paramSteven Miao1-9/+10
Pass wake up source mask and wakeup source polarity to deepsleep and hibernate. Signed-off-by: Steven Miao <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bf60x: pm: add smc nor flash syscore opsSteven Miao2-1/+25
Signed-off-by: Steven Miao <[email protected]> Signed-off-by: Bob Liu <[email protected]>
2012-07-24bfin: simple_timer: add READ_COUNTER ioctl and add NOIRQ timer modeSteven Miao1-0/+6
Signed-off-by: Steven Miao <[email protected]> Signed-off-by: Bob Liu <[email protected]>