Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2519
b: refs/heads/master
c: 2368086
h: refs/heads/master
i:
  2517: 64860a8
  2515: 82fa150
  2511: 0605107
v: v3
  • Loading branch information
Hirokazu Takata authored and Linus Torvalds committed Jun 22, 2005
1 parent bb3b8cd commit fc757e4
Show file tree
Hide file tree
Showing 20 changed files with 1,786 additions and 387 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: d4c477ca5448f19afaaf6c0cfd655009ea9e614d
refs/heads/master: 2368086344c3d67b0f4aecac39d620fb9b8795c3
7 changes: 6 additions & 1 deletion trunk/arch/m32r/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ config PLAT_OAKS32R
config PLAT_MAPPI2
bool "Mappi-II(M3A-ZA36/M3A-ZA52)"

config PLAT_MAPPI3
bool "Mappi-III(M3A-2170)"

endchoice

choice
Expand Down Expand Up @@ -134,6 +137,7 @@ config BUS_CLOCK
int "Bus Clock [Hz] (integer)"
default "70000000" if PLAT_MAPPI
default "25000000" if PLAT_USRV
default "50000000" if PLAT_MAPPI3
default "50000000" if PLAT_M32700UT
default "50000000" if PLAT_OPSPUT
default "33333333" if PLAT_OAKS32R
Expand All @@ -149,14 +153,15 @@ config CPU_LITTLE_ENDIAN

config MEMORY_START
hex "Physical memory start address (hex)"
default "08000000" if PLAT_MAPPI || PLAT_MAPPI2
default "08000000" if PLAT_MAPPI || PLAT_MAPPI2 || PLAT_MAPPI3
default "08000000" if PLAT_USRV
default "08000000" if PLAT_M32700UT
default "08000000" if PLAT_OPSPUT
default "01000000" if PLAT_OAKS32R

config MEMORY_SIZE
hex "Physical memory size (hex)"
default "08000000" if PLAT_MAPPI3
default "04000000" if PLAT_MAPPI || PLAT_MAPPI2
default "02000000" if PLAT_USRV
default "01000000" if PLAT_M32700UT
Expand Down
19 changes: 11 additions & 8 deletions trunk/arch/m32r/boot/compressed/m32r_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

#include <linux/config.h>
#include <asm/processor.h>

static void putc(char c);

Expand Down Expand Up @@ -38,16 +39,17 @@ static int puts(const char *s)

static void putc(char c)
{

while ((*BOOT_SIO0STS & 0x3) != 0x3) ;
while ((*BOOT_SIO0STS & 0x3) != 0x3)
cpu_relax();
if (c == '\n') {
*BOOT_SIO0TXB = '\r';
while ((*BOOT_SIO0STS & 0x3) != 0x3) ;
while ((*BOOT_SIO0STS & 0x3) != 0x3)
cpu_relax();
}
*BOOT_SIO0TXB = c;
}
#else /* defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) */
#ifdef CONFIG_MMU
#else /* !(CONFIG_PLAT_M32700UT_Alpha) && !(CONFIG_PLAT_M32700UT) */
#if defined(CONFIG_PLAT_MAPPI2)
#define SIO0STS (volatile unsigned short *)(0xa0efd000 + 14)
#define SIO0TXB (volatile unsigned short *)(0xa0efd000 + 30)
#else
Expand All @@ -57,11 +59,12 @@ static void putc(char c)

static void putc(char c)
{

while ((*SIO0STS & 0x1) == 0) ;
while ((*SIO0STS & 0x1) == 0)
cpu_relax();
if (c == '\n') {
*SIO0TXB = '\r';
while ((*SIO0STS & 0x1) == 0) ;
while ((*SIO0STS & 0x1) == 0)
cpu_relax();
}
*SIO0TXB = c;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/m32r/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ obj-y := process.o entry.o traps.o align.o irq.o setup.o time.o \
obj-$(CONFIG_SMP) += smp.o smpboot.o
obj-$(CONFIG_PLAT_MAPPI) += setup_mappi.o io_mappi.o
obj-$(CONFIG_PLAT_MAPPI2) += setup_mappi2.o io_mappi2.o
obj-$(CONFIG_PLAT_MAPPI3) += setup_mappi3.o io_mappi3.o
obj-$(CONFIG_PLAT_USRV) += setup_usrv.o io_usrv.o
obj-$(CONFIG_PLAT_M32700UT) += setup_m32700ut.o io_m32700ut.o
obj-$(CONFIG_PLAT_OPSPUT) += setup_opsput.o io_opsput.o
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_PLAT_OAKS32R) += setup_oaks32r.o io_oaks32r.o

EXTRA_AFLAGS := -traditional

92 changes: 8 additions & 84 deletions trunk/arch/m32r/kernel/io_m32700ut.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*
* Typical I/O routines for M32700UT board.
*
* Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata,
* Hitoshi Yamamoto, Takeo Takahashi
* Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata,
* Hitoshi Yamamoto, Takeo Takahashi
*
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file "COPYING" in the main directory of this
Expand Down Expand Up @@ -172,64 +172,21 @@ unsigned long _inl(unsigned long port)

unsigned char _inb_p(unsigned long port)
{
unsigned char v;

if (port >= LAN_IOSTART && port < LAN_IOEND)
v = _ne_inb(PORT2ADDR_NE(port));
else
#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
return *(volatile unsigned char *)__port2addr_ata(port);
} else
#endif
#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
unsigned char b;
pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0);
return b;
} else
#endif
v = *(volatile unsigned char *)PORT2ADDR(port);

unsigned char v = _inb(port);
delay();
return (v);
}

unsigned short _inw_p(unsigned long port)
{
unsigned short v;

if (port >= LAN_IOSTART && port < LAN_IOEND)
v = _ne_inw(PORT2ADDR_NE(port));
else
#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
return *(volatile unsigned short *)__port2addr_ata(port);
} else
#endif
#if defined(CONFIG_USB)
if(port >= 0x340 && port < 0x3a0)
return *(volatile unsigned short *)PORT2ADDR_USB(port);
else
#endif
#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
unsigned short w;
pcc_ioread_word(0, port, &w, sizeof(w), 1, 0);
return w;
} else
#endif
v = *(volatile unsigned short *)PORT2ADDR(port);

unsigned short v = _inw(port);
delay();
return (v);
}

unsigned long _inl_p(unsigned long port)
{
unsigned long v;

v = *(volatile unsigned long *)PORT2ADDR(port);
unsigned long v = _inl(port);
delay();
return (v);
}
Expand Down Expand Up @@ -287,52 +244,19 @@ void _outl(unsigned long l, unsigned long port)

void _outb_p(unsigned char b, unsigned long port)
{
if (port >= LAN_IOSTART && port < LAN_IOEND)
_ne_outb(b, PORT2ADDR_NE(port));
else
#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
*(volatile unsigned char *)__port2addr_ata(port) = b;
} else
#endif
#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0);
} else
#endif
*(volatile unsigned char *)PORT2ADDR(port) = b;

_outb(b, port);
delay();
}

void _outw_p(unsigned short w, unsigned long port)
{
if (port >= LAN_IOSTART && port < LAN_IOEND)
_ne_outw(w, PORT2ADDR_NE(port));
else
#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
*(volatile unsigned short *)__port2addr_ata(port) = w;
} else
#endif
#if defined(CONFIG_USB)
if(port >= 0x340 && port < 0x3a0)
*(volatile unsigned short *)PORT2ADDR_USB(port) = w;
else
#endif
#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0);
} else
#endif
*(volatile unsigned short *)PORT2ADDR(port) = w;

_outw(w, port);
delay();
}

void _outl_p(unsigned long l, unsigned long port)
{
*(volatile unsigned long *)PORT2ADDR(port) = l;
_outl(l, port);
delay();
}

Expand Down
74 changes: 8 additions & 66 deletions trunk/arch/m32r/kernel/io_mappi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*
* Typical I/O routines for Mappi board.
*
* Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata,
* Hitoshi Yamamoto
* Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata,
* Hitoshi Yamamoto
*/

#include <linux/config.h>
Expand Down Expand Up @@ -130,57 +130,21 @@ unsigned long _inl(unsigned long port)

unsigned char _inb_p(unsigned long port)
{
unsigned char v;

if (port >= 0x300 && port < 0x320)
v = _ne_inb(PORT2ADDR_NE(port));
else
#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
unsigned char b;
pcc_ioread(0, port, &b, sizeof(b), 1, 0);
return b;
} else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
unsigned char b;
pcc_ioread(1, port, &b, sizeof(b), 1, 0);
return b;
} else
#endif
v = *(volatile unsigned char *)PORT2ADDR(port);

unsigned char v = _inb(port);
delay();
return (v);
}

unsigned short _inw_p(unsigned long port)
{
unsigned short v;

if (port >= 0x300 && port < 0x320)
v = _ne_inw(PORT2ADDR_NE(port));
else
#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
unsigned short w;
pcc_ioread(0, port, &w, sizeof(w), 1, 0);
return w;
} else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
unsigned short w;
pcc_ioread(1, port, &w, sizeof(w), 1, 0);
return w;
} else
#endif
v = *(volatile unsigned short *)PORT2ADDR(port);

unsigned short v = _inw(port);
delay();
return (v);
}

unsigned long _inl_p(unsigned long port)
{
unsigned long v;

v = *(volatile unsigned long *)PORT2ADDR(port);
unsigned long v = _inl(port);
delay();
return (v);
}
Expand Down Expand Up @@ -229,41 +193,19 @@ void _outl(unsigned long l, unsigned long port)

void _outb_p(unsigned char b, unsigned long port)
{
if (port >= 0x300 && port < 0x320)
_ne_outb(b, PORT2ADDR_NE(port));
else
#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
pcc_iowrite(0, port, &b, sizeof(b), 1, 0);
} else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
pcc_iowrite(1, port, &b, sizeof(b), 1, 0);
} else
#endif
*(volatile unsigned char *)PORT2ADDR(port) = b;

_outb(b, port);
delay();
}

void _outw_p(unsigned short w, unsigned long port)
{
if (port >= 0x300 && port < 0x320)
_ne_outw(w, PORT2ADDR_NE(port));
else
#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
pcc_iowrite(0, port, &w, sizeof(w), 1, 0);
} else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
pcc_iowrite(1, port, &w, sizeof(w), 1, 0);
} else
#endif
*(volatile unsigned short *)PORT2ADDR(port) = w;

_outw(w, port);
delay();
}

void _outl_p(unsigned long l, unsigned long port)
{
*(volatile unsigned long *)PORT2ADDR(port) = l;
_outl(l, port);
delay();
}

Expand Down
Loading

0 comments on commit fc757e4

Please sign in to comment.