Merge branch 'parisc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller: "Lots of small enhancements and fixes in this patchset: - improved the x86-64 compatibility for PCI cards by returning -1UL for timed out MMIO transactions (instead of crashing) - fixed HPMC handler for PAT machines: size needs to be multiple of 16 - prepare machine_power_off() to be able to turn rp3410 and c8000 machines off via IMPI - added code to extract machine info for usage with qemu - some init sections fixes - lots of fixes for sparse-, ubsan- and uninitalized variables warnings" * 'parisc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix out of array access in match_pci_device() parisc: Add code generator for Qemu/SeaBIOS machine info parisc/pci: Switch LBA PCI bus from Hard Fail to Soft Fail mode parisc: Fix HPMC handler by increasing size to multiple of 16 bytes parisc: Directly call machine_power_off() in power button driver parisc: machine_power_off() should call pm_power_off() parisc/Kconfig: SMP kernels boot on all machines parisc: Silence uninitialized variable warning in dbl_to_sgl_fcnvff() parisc: Move various functions and strings to init section parisc: Convert MAP_TYPE to cover 4 bits on parisc parisc: Force to various endian types for sparse parisc/gscps2: Fix sparse warnings parisc/led: Fix sparse warnings parisc/parport_gsc: Use NULL to avoid sparse warning parisc/stifb: Use fb_memset() to avoid sparse warning
This commit is contained in:
@@ -91,7 +91,7 @@ struct gscps2port {
|
||||
struct parisc_device *padev;
|
||||
struct serio *port;
|
||||
spinlock_t lock;
|
||||
char *addr;
|
||||
char __iomem *addr;
|
||||
u8 act, append; /* position in buffer[] */
|
||||
struct {
|
||||
u8 data;
|
||||
@@ -114,7 +114,7 @@ struct gscps2port {
|
||||
* wait_TBE() - wait for Transmit Buffer Empty
|
||||
*/
|
||||
|
||||
static int wait_TBE(char *addr)
|
||||
static int wait_TBE(char __iomem *addr)
|
||||
{
|
||||
int timeout = 25000; /* device is expected to react within 250 msec */
|
||||
while (gscps2_readb_status(addr) & GSC_STAT_TBNE) {
|
||||
@@ -146,14 +146,14 @@ static void gscps2_flush(struct gscps2port *ps2port)
|
||||
static inline int gscps2_writeb_output(struct gscps2port *ps2port, u8 data)
|
||||
{
|
||||
unsigned long flags;
|
||||
char *addr = ps2port->addr;
|
||||
char __iomem *addr = ps2port->addr;
|
||||
|
||||
if (!wait_TBE(addr)) {
|
||||
printk(KERN_DEBUG PFX "timeout - could not write byte %#x\n", data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (gscps2_readb_status(ps2port->addr) & GSC_STAT_RBNE)
|
||||
while (gscps2_readb_status(addr) & GSC_STAT_RBNE)
|
||||
/* wait */;
|
||||
|
||||
spin_lock_irqsave(&ps2port->lock, flags);
|
||||
@@ -200,13 +200,12 @@ static void gscps2_enable(struct gscps2port *ps2port, int enable)
|
||||
|
||||
static void gscps2_reset(struct gscps2port *ps2port)
|
||||
{
|
||||
char *addr = ps2port->addr;
|
||||
unsigned long flags;
|
||||
|
||||
/* reset the interface */
|
||||
spin_lock_irqsave(&ps2port->lock, flags);
|
||||
gscps2_flush(ps2port);
|
||||
writeb(0xff, addr+GSC_RESET);
|
||||
writeb(0xff, ps2port->addr + GSC_RESET);
|
||||
gscps2_flush(ps2port);
|
||||
spin_unlock_irqrestore(&ps2port->lock, flags);
|
||||
}
|
||||
|
Reference in New Issue
Block a user