Skip to content

Commit

Permalink
Merge git://git.infradead.org/~dwmw2/dwmw2-2.6.27
Browse files Browse the repository at this point in the history
* git://git.infradead.org/~dwmw2/dwmw2-2.6.27:
  Revert "[ARM] use the new byteorder headers"
  Fix conditional export of kvh.h and a.out.h to userspace.
  [MTD] [NAND] tmio_nand: fix base address programming
  • Loading branch information
Linus Torvalds committed Sep 5, 2008
2 parents b693ffe + b35de67 commit 6f74b18
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
25 changes: 14 additions & 11 deletions arch/arm/include/asm/byteorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,7 @@
#include <linux/compiler.h>
#include <asm/types.h>

#ifdef __ARMEB__
# define __BIG_ENDIAN
#else
# define __LITTLE_ENDIAN
#endif

#define __SWAB_64_THRU_32__

static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
{
__u32 t;

Expand All @@ -48,8 +40,19 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x)

return x;
}
#define __arch_swab32 __arch_swab32

#include <linux/byteorder.h>
#define __arch__swab32(x) ___arch__swab32(x)

#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
# define __BYTEORDER_HAS_U64__
# define __SWAB_64_THRU_32__
#endif

#ifdef __ARMEB__
#include <linux/byteorder/big_endian.h>
#else
#include <linux/byteorder/little_endian.h>
#endif

#endif

8 changes: 4 additions & 4 deletions drivers/mtd/nand/tmio_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ struct tmio_nand {

void __iomem *ccr;
void __iomem *fcr;
unsigned long fcr_phys;
unsigned long fcr_base;

unsigned int irq;

Expand Down Expand Up @@ -316,8 +316,8 @@ static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio)
tmio_iowrite8(0x81, tmio->ccr + CCR_ICC);

/* (10h)BaseAddress 0x1000 spba.spba2 */
tmio_iowrite16(tmio->fcr_phys, tmio->ccr + CCR_BASE);
tmio_iowrite16(tmio->fcr_phys >> 16, tmio->ccr + CCR_BASE + 16);
tmio_iowrite16(tmio->fcr_base, tmio->ccr + CCR_BASE);
tmio_iowrite16(tmio->fcr_base >> 16, tmio->ccr + CCR_BASE + 2);

/* (04h)Command Register I/O spcmd */
tmio_iowrite8(0x02, tmio->ccr + CCR_COMMAND);
Expand Down Expand Up @@ -395,7 +395,7 @@ static int tmio_probe(struct platform_device *dev)
goto err_iomap_ccr;
}

tmio->fcr_phys = (unsigned long)fcr->start;
tmio->fcr_base = fcr->start & 0xfffff;
tmio->fcr = ioremap(fcr->start, fcr->end - fcr->start + 1);
if (!tmio->fcr) {
retval = -EIO;
Expand Down
6 changes: 4 additions & 2 deletions include/asm-generic/Kbuild.asm
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/kvm.h),)
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
$(srctree)/include/asm-$(SRCARCH)/kvm.h),)
header-y += kvm.h
endif

ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
$(srctree)/include/asm-$(SRCARCH)/a.out.h),)
unifdef-y += a.out.h
endif
unifdef-y += auxvec.h
Expand Down
6 changes: 4 additions & 2 deletions include/linux/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ unifdef-y += acct.h
unifdef-y += adb.h
unifdef-y += adfs_fs.h
unifdef-y += agpgart.h
ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
$(srctree)/include/asm-$(SRCARCH)/a.out.h),)
unifdef-y += a.out.h
endif
unifdef-y += apm_bios.h
Expand Down Expand Up @@ -258,7 +259,8 @@ unifdef-y += kd.h
unifdef-y += kernelcapi.h
unifdef-y += kernel.h
unifdef-y += keyboard.h
ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/kvm.h),)
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
$(srctree)/include/asm-$(SRCARCH)/kvm.h),)
unifdef-y += kvm.h
endif
unifdef-y += llc.h
Expand Down

0 comments on commit 6f74b18

Please sign in to comment.