Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36234
b: refs/heads/master
c: 6d75e65
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Sep 27, 2006
1 parent 58c1983 commit dfbdd36
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 77 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: d95fb13c960ae19e9fd4a95807eb68fa20caf537
refs/heads/master: 6d75e650f1d0d59fd97c7629f0903ef18e8dfb7b
11 changes: 5 additions & 6 deletions trunk/arch/sh/cchips/hd6446x/hd64461/io.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/*
* $Id: io.c,v 1.6 2004/03/16 00:07:50 lethal Exp $
* Copyright (C) 2000 YAEGASHI Takeshi
* Typical I/O routines for HD64461 system.
*/

#include <asm/io.h>
#include <asm/hd64461/hd64461.h>
#include <asm/hd64461.h>

#define MEM_BASE (CONFIG_HD64461_IOBASE - HD64461_STBCR)

Expand Down Expand Up @@ -144,13 +143,13 @@ void hd64461_outsl(unsigned long port, const void *buffer, unsigned long count)
while(count--) *addr=*buf++;
}

unsigned short hd64461_readw(unsigned long addr)
unsigned short hd64461_readw(void __iomem *addr)
{
return *(volatile unsigned short*)(MEM_BASE+addr);
return ctrl_inw(MEM_BASE+(unsigned long __force)addr);
}

void hd64461_writew(unsigned short b, unsigned long addr)
void hd64461_writew(unsigned short b, void __iomem *addr)
{
*(volatile unsigned short*)(MEM_BASE+addr) = b;
ctrl_outw(b, MEM_BASE+(unsigned long __force)addr);
}

3 changes: 1 addition & 2 deletions trunk/arch/sh/cchips/hd6446x/hd64461/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

#include <asm/io.h>
#include <asm/irq.h>

#include <asm/hd64461/hd64461.h>
#include <asm/hd64461.h>

static void disable_hd64461_irq(unsigned int irq)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
#define HD64461_LDVSPR 0x1101c
#define HD64461_LDR3 0x1101e

#define HD64461_CPTWAR 0x11030
#define HD64461_CPTWAR 0x11030
#define HD64461_CPTWDR 0x11032
#define HD64461_CPTRAR 0x11034
#define HD64461_CPTRAR 0x11034
#define HD64461_CPTRDR 0x11036

#define HD64461_GRDOR 0x11040
Expand Down Expand Up @@ -111,7 +111,7 @@
#define HD64461_PCCISR_BVD1 0x01 /* battery 1 */

#define HD64461_PCCISR_PCD_MASK 0x0c /* card detect */
#define HD64461_PCCISR_BVD_MASK 0x03 /* battery voltage */
#define HD64461_PCCISR_BVD_MASK 0x03 /* battery voltage */
#define HD64461_PCCISR_BVD_BATGOOD 0x03 /* battery good */
#define HD64461_PCCISR_BVD_BATWARN 0x01 /* battery low warning */
#define HD64461_PCCISR_BVD_BATDEAD1 0x02 /* battery dead */
Expand Down Expand Up @@ -139,11 +139,11 @@

/* PCC Card Status Change Interrupt Enable Register */
#define HD64461_PCCCSCIER_CRE 0x80 /* change reset enable */
#define HD64461_PCCCSCIER_IREQE_MASK 0x60 /* IREQ enable */
#define HD64461_PCCCSCIER_IREQE_MASK 0x60 /* IREQ enable */
#define HD64461_PCCCSCIER_IREQE_DISABLED 0x00 /* IREQ disabled */
#define HD64461_PCCCSCIER_IREQE_LEVEL 0x20 /* IREQ level-triggered */
#define HD64461_PCCCSCIER_IREQE_LEVEL 0x20 /* IREQ level-triggered */
#define HD64461_PCCCSCIER_IREQE_FALLING 0x40 /* IREQ falling-edge-trig */
#define HD64461_PCCCSCIER_IREQE_RISING 0x60 /* IREQ rising-edge-trig */
#define HD64461_PCCCSCIER_IREQE_RISING 0x60 /* IREQ rising-edge-trig */

#define HD64461_PCCCSCIER_SCE 0x10 /* status change enable */
#define HD64461_PCCCSCIER_CDE 0x08 /* card detect change enable */
Expand All @@ -155,7 +155,6 @@
#define HD64461_PCCSCR_VCC1 0x02 /* voltage control pin 1 */
#define HD64461_PCCSCR_SWP 0x01 /* write protect */


#define HD64461_P0OCR 0x1202a
#define HD64461_P1OCR 0x1202c
#define HD64461_PGCR 0x1202e
Expand All @@ -180,23 +179,25 @@
#define HD64461_NIRR 0x15000
#define HD64461_NIMR 0x15002

#ifndef CONFIG_HD64461_IOBASE
#define CONFIG_HD64461_IOBASE 0xb0000000
#endif
#ifndef CONFIG_HD64461_IRQ
#define CONFIG_HD64461_IRQ 36
#endif

#define HD64461_IRQBASE OFFCHIP_IRQ_BASE
#define HD64461_IRQ_NUM 16

#define HD64461_IRQ_UART (HD64461_IRQBASE+5)
#define HD64461_IRQ_IRDA (HD64461_IRQBASE+6)
#define HD64461_IRQ_TMU1 (HD64461_IRQBASE+9)
#define HD64461_IRQ_TMU0 (HD64461_IRQBASE+10)
#define HD64461_IRQ_GPIO (HD64461_IRQBASE+11)
#define HD64461_IRQ_AFE (HD64461_IRQBASE+12)
#define HD64461_IRQ_PCC1 (HD64461_IRQBASE+13)
#define HD64461_IRQ_PCC0 (HD64461_IRQBASE+14)
#define HD64461_IRQ_NUM 16

#define HD64461_IRQ_UART (HD64461_IRQBASE+5)
#define HD64461_IRQ_IRDA (HD64461_IRQBASE+6)
#define HD64461_IRQ_TMU1 (HD64461_IRQBASE+9)
#define HD64461_IRQ_TMU0 (HD64461_IRQBASE+10)
#define HD64461_IRQ_GPIO (HD64461_IRQBASE+11)
#define HD64461_IRQ_AFE (HD64461_IRQBASE+12)
#define HD64461_IRQ_PCC1 (HD64461_IRQBASE+13)
#define HD64461_IRQ_PCC0 (HD64461_IRQBASE+14)

#define __IO_PREFIX hd64461
#include <asm/io_generic.h>

/* arch/sh/cchips/hd6446x/hd64461/setup.c */
int hd64461_irq_demux(int irq);
void hd64461_register_irq_demux(int irq,
int (*demux) (int irq, void *dev), void *dev);
void hd64461_unregister_irq_demux(int irq);

#endif
43 changes: 0 additions & 43 deletions trunk/include/asm-sh/hd64461/io.h

This file was deleted.

2 changes: 1 addition & 1 deletion trunk/include/asm-sh/hp6xx/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*
* Nothing special here.. just use the generic cchip io routines.
*/
#include <asm/hd64461/io.h>
#include <asm/hd64461.h>

#endif /* __ASM_SH_HP6XX_IO_H */

0 comments on commit dfbdd36

Please sign in to comment.