@@ -277,58 +277,56 @@ extern void _memcpy_toio(volatile void __iomem *dest, const void *src,
277
277
/* Shortcut to the MMIO argument pointer */
278
278
#define PCI_IO_ADDR volatile void __iomem *
279
279
280
- #define PCI_FIX_ADDR (addr ) (addr)
281
-
282
280
/*
283
281
* Non ordered and non-swapping "raw" accessors
284
282
*/
285
283
286
284
static inline unsigned char __raw_readb (const volatile void __iomem * addr )
287
285
{
288
- return * (volatile unsigned char __force * )PCI_FIX_ADDR ( addr ) ;
286
+ return * (volatile unsigned char __force * )addr ;
289
287
}
290
288
#define __raw_readb __raw_readb
291
289
292
290
static inline unsigned short __raw_readw (const volatile void __iomem * addr )
293
291
{
294
- return * (volatile unsigned short __force * )PCI_FIX_ADDR ( addr ) ;
292
+ return * (volatile unsigned short __force * )addr ;
295
293
}
296
294
#define __raw_readw __raw_readw
297
295
298
296
static inline unsigned int __raw_readl (const volatile void __iomem * addr )
299
297
{
300
- return * (volatile unsigned int __force * )PCI_FIX_ADDR ( addr ) ;
298
+ return * (volatile unsigned int __force * )addr ;
301
299
}
302
300
#define __raw_readl __raw_readl
303
301
304
302
static inline void __raw_writeb (unsigned char v , volatile void __iomem * addr )
305
303
{
306
- * (volatile unsigned char __force * )PCI_FIX_ADDR ( addr ) = v ;
304
+ * (volatile unsigned char __force * )addr = v ;
307
305
}
308
306
#define __raw_writeb __raw_writeb
309
307
310
308
static inline void __raw_writew (unsigned short v , volatile void __iomem * addr )
311
309
{
312
- * (volatile unsigned short __force * )PCI_FIX_ADDR ( addr ) = v ;
310
+ * (volatile unsigned short __force * )addr = v ;
313
311
}
314
312
#define __raw_writew __raw_writew
315
313
316
314
static inline void __raw_writel (unsigned int v , volatile void __iomem * addr )
317
315
{
318
- * (volatile unsigned int __force * )PCI_FIX_ADDR ( addr ) = v ;
316
+ * (volatile unsigned int __force * )addr = v ;
319
317
}
320
318
#define __raw_writel __raw_writel
321
319
322
320
#ifdef __powerpc64__
323
321
static inline unsigned long __raw_readq (const volatile void __iomem * addr )
324
322
{
325
- return * (volatile unsigned long __force * )PCI_FIX_ADDR ( addr ) ;
323
+ return * (volatile unsigned long __force * )addr ;
326
324
}
327
325
#define __raw_readq __raw_readq
328
326
329
327
static inline void __raw_writeq (unsigned long v , volatile void __iomem * addr )
330
328
{
331
- * (volatile unsigned long __force * )PCI_FIX_ADDR ( addr ) = v ;
329
+ * (volatile unsigned long __force * )addr = v ;
332
330
}
333
331
#define __raw_writeq __raw_writeq
334
332
@@ -507,30 +505,30 @@ __do_out_asm(_rec_outl, "stwbrx")
507
505
* possible to hook directly at the toplevel PIO operation if they have to
508
506
* be handled differently
509
507
*/
510
- #define __do_writeb (val , addr ) out_8(PCI_FIX_ADDR( addr) , val)
511
- #define __do_writew (val , addr ) out_le16(PCI_FIX_ADDR( addr) , val)
512
- #define __do_writel (val , addr ) out_le32(PCI_FIX_ADDR( addr) , val)
513
- #define __do_writeq (val , addr ) out_le64(PCI_FIX_ADDR( addr) , val)
514
- #define __do_writew_be (val , addr ) out_be16(PCI_FIX_ADDR( addr) , val)
515
- #define __do_writel_be (val , addr ) out_be32(PCI_FIX_ADDR( addr) , val)
516
- #define __do_writeq_be (val , addr ) out_be64(PCI_FIX_ADDR( addr) , val)
508
+ #define __do_writeb (val , addr ) out_8(addr, val)
509
+ #define __do_writew (val , addr ) out_le16(addr, val)
510
+ #define __do_writel (val , addr ) out_le32(addr, val)
511
+ #define __do_writeq (val , addr ) out_le64(addr, val)
512
+ #define __do_writew_be (val , addr ) out_be16(addr, val)
513
+ #define __do_writel_be (val , addr ) out_be32(addr, val)
514
+ #define __do_writeq_be (val , addr ) out_be64(addr, val)
517
515
518
516
#ifdef CONFIG_EEH
519
- #define __do_readb (addr ) eeh_readb(PCI_FIX_ADDR( addr) )
520
- #define __do_readw (addr ) eeh_readw(PCI_FIX_ADDR( addr) )
521
- #define __do_readl (addr ) eeh_readl(PCI_FIX_ADDR( addr) )
522
- #define __do_readq (addr ) eeh_readq(PCI_FIX_ADDR( addr) )
523
- #define __do_readw_be (addr ) eeh_readw_be(PCI_FIX_ADDR( addr) )
524
- #define __do_readl_be (addr ) eeh_readl_be(PCI_FIX_ADDR( addr) )
525
- #define __do_readq_be (addr ) eeh_readq_be(PCI_FIX_ADDR( addr) )
517
+ #define __do_readb (addr ) eeh_readb(addr)
518
+ #define __do_readw (addr ) eeh_readw(addr)
519
+ #define __do_readl (addr ) eeh_readl(addr)
520
+ #define __do_readq (addr ) eeh_readq(addr)
521
+ #define __do_readw_be (addr ) eeh_readw_be(addr)
522
+ #define __do_readl_be (addr ) eeh_readl_be(addr)
523
+ #define __do_readq_be (addr ) eeh_readq_be(addr)
526
524
#else /* CONFIG_EEH */
527
- #define __do_readb (addr ) in_8(PCI_FIX_ADDR( addr) )
528
- #define __do_readw (addr ) in_le16(PCI_FIX_ADDR( addr) )
529
- #define __do_readl (addr ) in_le32(PCI_FIX_ADDR( addr) )
530
- #define __do_readq (addr ) in_le64(PCI_FIX_ADDR( addr) )
531
- #define __do_readw_be (addr ) in_be16(PCI_FIX_ADDR( addr) )
532
- #define __do_readl_be (addr ) in_be32(PCI_FIX_ADDR( addr) )
533
- #define __do_readq_be (addr ) in_be64(PCI_FIX_ADDR( addr) )
525
+ #define __do_readb (addr ) in_8(addr)
526
+ #define __do_readw (addr ) in_le16(addr)
527
+ #define __do_readl (addr ) in_le32(addr)
528
+ #define __do_readq (addr ) in_le64(addr)
529
+ #define __do_readw_be (addr ) in_be16(addr)
530
+ #define __do_readl_be (addr ) in_be32(addr)
531
+ #define __do_readq_be (addr ) in_be64(addr)
534
532
#endif /* !defined(CONFIG_EEH) */
535
533
536
534
#ifdef CONFIG_PPC32
@@ -550,17 +548,17 @@ __do_out_asm(_rec_outl, "stwbrx")
550
548
#endif /* !CONFIG_PPC32 */
551
549
552
550
#ifdef CONFIG_EEH
553
- #define __do_readsb (a , b , n ) eeh_readsb(PCI_FIX_ADDR(a) , (b), (n))
554
- #define __do_readsw (a , b , n ) eeh_readsw(PCI_FIX_ADDR(a) , (b), (n))
555
- #define __do_readsl (a , b , n ) eeh_readsl(PCI_FIX_ADDR(a) , (b), (n))
551
+ #define __do_readsb (a , b , n ) eeh_readsb(a , (b), (n))
552
+ #define __do_readsw (a , b , n ) eeh_readsw(a , (b), (n))
553
+ #define __do_readsl (a , b , n ) eeh_readsl(a , (b), (n))
556
554
#else /* CONFIG_EEH */
557
- #define __do_readsb (a , b , n ) _insb(PCI_FIX_ADDR(a) , (b), (n))
558
- #define __do_readsw (a , b , n ) _insw(PCI_FIX_ADDR(a) , (b), (n))
559
- #define __do_readsl (a , b , n ) _insl(PCI_FIX_ADDR(a) , (b), (n))
555
+ #define __do_readsb (a , b , n ) _insb(a , (b), (n))
556
+ #define __do_readsw (a , b , n ) _insw(a , (b), (n))
557
+ #define __do_readsl (a , b , n ) _insl(a , (b), (n))
560
558
#endif /* !CONFIG_EEH */
561
- #define __do_writesb (a , b , n ) _outsb(PCI_FIX_ADDR(a), (b),(n))
562
- #define __do_writesw (a , b , n ) _outsw(PCI_FIX_ADDR(a), (b),(n))
563
- #define __do_writesl (a , b , n ) _outsl(PCI_FIX_ADDR(a), (b),(n))
559
+ #define __do_writesb (a , b , n ) _outsb(a, (b), (n))
560
+ #define __do_writesw (a , b , n ) _outsw(a, (b), (n))
561
+ #define __do_writesl (a , b , n ) _outsl(a, (b), (n))
564
562
565
563
#define __do_insb (p , b , n ) readsb((PCI_IO_ADDR)(_IO_BASE+(p)), (b), (n))
566
564
#define __do_insw (p , b , n ) readsw((PCI_IO_ADDR)(_IO_BASE+(p)), (b), (n))
@@ -570,16 +568,16 @@ __do_out_asm(_rec_outl, "stwbrx")
570
568
#define __do_outsl (p , b , n ) writesl((PCI_IO_ADDR)(_IO_BASE+(p)),(b),(n))
571
569
572
570
#define __do_memset_io (addr , c , n ) \
573
- _memset_io(PCI_FIX_ADDR( addr) , c, n)
571
+ _memset_io(addr, c, n)
574
572
#define __do_memcpy_toio (dst , src , n ) \
575
- _memcpy_toio(PCI_FIX_ADDR( dst) , src, n)
573
+ _memcpy_toio(dst, src, n)
576
574
577
575
#ifdef CONFIG_EEH
578
576
#define __do_memcpy_fromio (dst , src , n ) \
579
- eeh_memcpy_fromio(dst, PCI_FIX_ADDR( src) , n)
577
+ eeh_memcpy_fromio(dst, src, n)
580
578
#else /* CONFIG_EEH */
581
579
#define __do_memcpy_fromio (dst , src , n ) \
582
- _memcpy_fromio(dst,PCI_FIX_ADDR( src), n)
580
+ _memcpy_fromio(dst, src, n)
583
581
#endif /* !CONFIG_EEH */
584
582
585
583
#ifdef CONFIG_PPC_INDIRECT_PIO
0 commit comments