Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173489
b: refs/heads/master
c: e9c58fc
h: refs/heads/master
i:
  173487: c407041
v: v3
  • Loading branch information
Paul Mundt committed Nov 12, 2009
1 parent b6cc6ce commit 2daab8a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 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: c4e708dc52b0e68d81a322ad11b280374685956e
refs/heads/master: e9c58fc57b17bfa75c256fb4f45ce22de6626858
12 changes: 3 additions & 9 deletions trunk/arch/sh/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,11 @@
#define ctrl_outl __raw_writel
#define ctrl_outq __raw_writeq

extern unsigned long generic_io_base;

static inline void ctrl_delay(void)
{
#ifdef CONFIG_CPU_SH4
__raw_readw(CCN_PVR);
#elif defined(P2SEG)
__raw_readw(P2SEG);
#else
#error "Need a dummy address for delay"
#endif
__raw_readw(generic_io_base);
}

#define __BUILD_MEMORY_STRING(bwlq, type) \
Expand Down Expand Up @@ -186,8 +182,6 @@ __BUILD_MEMORY_STRING(q, u64)

#define IO_SPACE_LIMIT 0xffffffff

extern unsigned long generic_io_base;

/*
* This function provides a method for the generic case where a
* board-specific ioport_map simply needs to return the port + some
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/sh/kernel/io_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#define dummy_read()
#endif

unsigned long generic_io_base;
unsigned long generic_io_base = 0;

u8 generic_inb(unsigned long port)
{
Expand Down Expand Up @@ -147,8 +147,10 @@ void generic_outsl(unsigned long port, const void *src, unsigned long count)

void __iomem *generic_ioport_map(unsigned long addr, unsigned int size)
{
#ifdef P1SEG
if (PXSEG(addr) >= P1SEG)
return (void __iomem *)addr;
#endif

return (void __iomem *)(addr + generic_io_base);
}
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/sh/kernel/machvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,9 @@ void __init sh_mv_setup(void)
if (!sh_mv.mv_nr_irqs)
sh_mv.mv_nr_irqs = NR_IRQS;

#ifdef P2SEG
__set_io_port_base(P2SEG);
#else
__set_io_port_base(0);
#endif
}

0 comments on commit 2daab8a

Please sign in to comment.