Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136816
b: refs/heads/master
c: 133822c
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Fitzhardinge committed Feb 6, 2009
1 parent 00629ed commit 0a37c22
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 52 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 976e8f677e42757e5586ea04a9ac8bb8ddaa037e
refs/heads/master: 133822c5c038b265ddb6545cda3a4c88815c7d3d
31 changes: 31 additions & 0 deletions trunk/arch/x86/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,37 @@ static inline void *phys_to_virt(phys_addr_t address)
#define virt_to_bus virt_to_phys
#define bus_to_virt phys_to_virt

/**
* ioremap - map bus memory into CPU space
* @offset: bus address of the memory
* @size: size of the resource to map
*
* ioremap performs a platform specific sequence of operations to
* make bus memory CPU accessible via the readb/readw/readl/writeb/
* writew/writel functions and the other mmio helpers. The returned
* address is not guaranteed to be usable directly as a virtual
* address.
*
* If the area you are trying to map is a PCI BAR you should have a
* look at pci_iomap().
*/
extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
unsigned long prot_val);

/*
* The default ioremap() behavior is non-cached:
*/
static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
{
return ioremap_nocache(offset, size);
}

extern void iounmap(volatile void __iomem *addr);

extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);


#ifdef CONFIG_X86_32
# include "io_32.h"
Expand Down
29 changes: 0 additions & 29 deletions trunk/arch/x86/include/asm/io_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,35 +53,6 @@
*/
#define xlate_dev_kmem_ptr(p) p

/**
* ioremap - map bus memory into CPU space
* @offset: bus address of the memory
* @size: size of the resource to map
*
* ioremap performs a platform specific sequence of operations to
* make bus memory CPU accessible via the readb/readw/readl/writeb/
* writew/writel functions and the other mmio helpers. The returned
* address is not guaranteed to be usable directly as a virtual
* address.
*
* If the area you are trying to map is a PCI BAR you should have a
* look at pci_iomap().
*/
extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
unsigned long prot_val);

/*
* The default ioremap() behavior is non-cached:
*/
static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
{
return ioremap_nocache(offset, size);
}

extern void iounmap(volatile void __iomem *addr);

static inline void
memset_io(volatile void __iomem *addr, unsigned char val, int count)
{
Expand Down
22 changes: 0 additions & 22 deletions trunk/arch/x86/include/asm/io_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,28 +144,6 @@ __OUTS(l)

#include <asm-generic/iomap.h>

/*
* This one maps high address device memory and turns off caching for that area.
* it's useful if some control registers are in such an area and write combining
* or read caching is not desirable:
*/
extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
unsigned long prot_val);

/*
* The default ioremap() behavior is non-cached:
*/
static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
{
return ioremap_nocache(offset, size);
}

extern void iounmap(volatile void __iomem *addr);

extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);

void __memcpy_fromio(void *, unsigned long, unsigned);
void __memcpy_toio(unsigned long, const void *, unsigned);

Expand Down

0 comments on commit 0a37c22

Please sign in to comment.