Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a302358 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.23

* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.23:
  sh: Fix fs.h removal from mm.h regressions.
  sh: fix get_wchan() for SH kernels without framepointers
  sh: arch/sh/boot - fix shell usage
  rtc: rtc-sh: Correct sh_rtc_set_time() for some SH-3 parts.
  sh: remove support for sh7300 and solution engine 7300
  sh: Add sh to the CC_OPTIMIZE_FOR_SIZE dependencies.
  sh: Kill off virt_to_bus()/bus_to_virt().
  sh: sh-sci - fix SH7708 support
  sh: Restrict DSP support to specific CPUs.
  sh: Silence sq compile warning on sh4 nommu.
  sh: Kill the rest of the SE73180 cruft.
  sh: remove support for sh73180 and solution engine 73180
  sh: remove old broken pint code
  sh: Reclaim beginning of P3 space for vmalloc area.
  sh: Fix Dreamcast DMA issues.
  sh: Add kmap_coherent()/kunmap_coherent() interface for SH-4.
parents 8e268f33 e06c4e57
Loading
Loading
Loading
Loading
+10 −23
Original line number Diff line number Diff line
@@ -90,6 +90,9 @@ config ARCH_HAS_ILOG2_U64
	bool
	default n

config ARCH_NO_VIRT_TO_BUS
	def_bool y

source "init/Kconfig"

menu "System type"
@@ -134,8 +137,8 @@ config SH_FPU_EMU

config SH_DSP
	bool "DSP support"
	default y if SH4AL_DSP || !CPU_SH4
	default n
	depends on CPU_HAS_DSP
	default y
	help
	  Selecting this option will enable support for SH processors that
	  have DSP units (ie, SH2-DSP, SH3-DSP, and SH4AL-DSP).
@@ -172,9 +175,6 @@ config SPECULATIVE_EXECUTION
config CPU_HAS_INTEVT
	bool

config CPU_HAS_PINT_IRQ
	bool

config CPU_HAS_MASKREG_IRQ
	bool

@@ -202,6 +202,9 @@ config CPU_HAS_SR_RB
config CPU_HAS_PTEA
	bool

config CPU_HAS_DSP
	bool

endmenu

menu "Board support"
@@ -261,14 +264,6 @@ config SH_7780_SOLUTION_ENGINE
	  Select 7780 SolutionEngine if configuring for a Renesas SH7780
	  evaluation board.

config SH_7300_SOLUTION_ENGINE
	bool "SolutionEngine7300"
	select SOLUTION_ENGINE
	depends on CPU_SUBTYPE_SH7300
	help
	  Select 7300 SolutionEngine if configuring for a Hitachi
	  SH7300(SH-Mobile V) evaluation board.

config SH_7343_SOLUTION_ENGINE
	bool "SolutionEngine7343"
	select SOLUTION_ENGINE
@@ -277,14 +272,6 @@ config SH_7343_SOLUTION_ENGINE
	  Select 7343 SolutionEngine if configuring for a Hitachi
	  SH7343 (SH-Mobile 3AS) evaluation board.

config SH_73180_SOLUTION_ENGINE
	bool "SolutionEngine73180"
	select SOLUTION_ENGINE
	depends on CPU_SUBTYPE_SH73180
	help
	  Select 73180 SolutionEngine if configuring for a Hitachi
	  SH73180(SH-Mobile 3) evaluation board.

config SH_7751_SYSTEMH
	bool "SystemH7751R"
	depends on CPU_SUBTYPE_SH7751R
@@ -448,10 +435,10 @@ config SH_TIMER_IRQ

config SH_PCLK_FREQ
	int "Peripheral clock frequency (in Hz)"
	default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343
	default "27000000" if CPU_SUBTYPE_SH7343
	default "31250000" if CPU_SUBTYPE_SH7619
	default "32000000" if CPU_SUBTYPE_SH7722
	default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || \
	default "33333333" if CPU_SUBTYPE_SH7770 || \
			      CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 || \
			      CPU_SUBTYPE_SH7206
	default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
+0 −2
Original line number Diff line number Diff line
@@ -91,9 +91,7 @@ machdir-$(CONFIG_SH_SOLUTION_ENGINE) += se/770x
machdir-$(CONFIG_SH_7722_SOLUTION_ENGINE)	+= se/7722
machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE)	+= se/7751
machdir-$(CONFIG_SH_7780_SOLUTION_ENGINE)	+= se/7780
machdir-$(CONFIG_SH_7300_SOLUTION_ENGINE)	+= se/7300
machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE)	+= se/7343
machdir-$(CONFIG_SH_73180_SOLUTION_ENGINE)	+= se/73180
machdir-$(CONFIG_SH_HP6XX)			+= hp6xx
machdir-$(CONFIG_SH_DREAMCAST)			+= dreamcast
machdir-$(CONFIG_SH_MPC1211)			+= mpc1211

arch/sh/boards/se/7300/Makefile

deleted100644 → 0
+0 −5
Original line number Diff line number Diff line
#
# Makefile for the 7300 SolutionEngine specific parts of the kernel
#

obj-y	 := setup.o io.o irq.o

arch/sh/boards/se/7300/io.c

deleted100644 → 0
+0 −268
Original line number Diff line number Diff line
/*
 * arch/sh/boards/se/7300/io.c
 *
 * Copyright (C) 2003 YOSHII Takashi <yoshii-takashi@hitachi-ul.co.jp>
 * Based on arch/sh/kernel/io_shmse.c
 *
 * I/O routine for SH-Mobile3 73180 SolutionEngine.
 *
 */

#include <linux/kernel.h>
#include <asm/io.h>
#include <asm/se7300.h>

#define badio(fn, a) panic("bad i/o operation %s for %08lx.", #fn, a)

struct iop {
	unsigned long start, end;
	unsigned long base;
	struct iop *(*check) (struct iop * p, unsigned long port);
	unsigned char (*inb) (struct iop * p, unsigned long port);
	unsigned short (*inw) (struct iop * p, unsigned long port);
	void (*outb) (struct iop * p, unsigned char value, unsigned long port);
	void (*outw) (struct iop * p, unsigned short value, unsigned long port);
};

struct iop *
simple_check(struct iop *p, unsigned long port)
{
	if ((p->start <= port) && (port <= p->end))
		return p;
	else
		badio(check, port);
}

struct iop *
ide_check(struct iop *p, unsigned long port)
{
	if (((0x1f0 <= port) && (port <= 0x1f7)) || (port == 0x3f7))
		return p;
	return NULL;
}

unsigned char
simple_inb(struct iop *p, unsigned long port)
{
	return *(unsigned char *) (p->base + port);
}

unsigned short
simple_inw(struct iop *p, unsigned long port)
{
	return *(unsigned short *) (p->base + port);
}

void
simple_outb(struct iop *p, unsigned char value, unsigned long port)
{
	*(unsigned char *) (p->base + port) = value;
}

void
simple_outw(struct iop *p, unsigned short value, unsigned long port)
{
	*(unsigned short *) (p->base + port) = value;
}

unsigned char
pcc_inb(struct iop *p, unsigned long port)
{
	unsigned long addr = p->base + port + 0x40000;
	unsigned long v;

	if (port & 1)
		addr += 0x00400000;
	v = *(volatile unsigned char *) addr;
	return v;
}

void
pcc_outb(struct iop *p, unsigned char value, unsigned long port)
{
	unsigned long addr = p->base + port + 0x40000;

	if (port & 1)
		addr += 0x00400000;
	*(volatile unsigned char *) addr = value;
}

unsigned char
bad_inb(struct iop *p, unsigned long port)
{
	badio(inb, port);
}

void
bad_outb(struct iop *p, unsigned char value, unsigned long port)
{
	badio(inw, port);
}

#ifdef CONFIG_SMC91X
/* MSTLANEX01 LAN at 0xb400:0000 */
static struct iop laniop = {
	.start = 0x300,
	.end = 0x30f,
	.base = 0xb4000000,
	.check = simple_check,
	.inb = simple_inb,
	.inw = simple_inw,
	.outb = simple_outb,
	.outw = simple_outw,
};
#endif

/* NE2000 pc card NIC */
static struct iop neiop = {
	.start = 0x280,
	.end = 0x29f,
	.base = 0xb0600000 + 0x80,	/* soft 0x280 -> hard 0x300 */
	.check = simple_check,
	.inb = pcc_inb,
	.inw = simple_inw,
	.outb = pcc_outb,
	.outw = simple_outw,
};

#ifdef CONFIG_IDE
/* CF in CF slot */
static struct iop cfiop = {
	.base = 0xb0600000,
	.check = ide_check,
	.inb = pcc_inb,
	.inw = simple_inw,
	.outb = pcc_outb,
	.outw = simple_outw,
};
#endif

static __inline__ struct iop *
port2iop(unsigned long port)
{
	if (0) ;
#if defined(CONFIG_SMC91X)
	else if (laniop.check(&laniop, port))
		return &laniop;
#endif
#if defined(CONFIG_NE2000)
	else if (neiop.check(&neiop, port))
		return &neiop;
#endif
#if defined(CONFIG_IDE)
	else if (cfiop.check(&cfiop, port))
		return &cfiop;
#endif
	else
		return &neiop;	/* fallback */
}

static inline void
delay(void)
{
	ctrl_inw(0xac000000);
	ctrl_inw(0xac000000);
}

unsigned char
sh7300se_inb(unsigned long port)
{
	struct iop *p = port2iop(port);
	return (p->inb) (p, port);
}

unsigned char
sh7300se_inb_p(unsigned long port)
{
	unsigned char v = sh7300se_inb(port);
	delay();
	return v;
}

unsigned short
sh7300se_inw(unsigned long port)
{
	struct iop *p = port2iop(port);
	return (p->inw) (p, port);
}

unsigned int
sh7300se_inl(unsigned long port)
{
	badio(inl, port);
}

void
sh7300se_outb(unsigned char value, unsigned long port)
{
	struct iop *p = port2iop(port);
	(p->outb) (p, value, port);
}

void
sh7300se_outb_p(unsigned char value, unsigned long port)
{
	sh7300se_outb(value, port);
	delay();
}

void
sh7300se_outw(unsigned short value, unsigned long port)
{
	struct iop *p = port2iop(port);
	(p->outw) (p, value, port);
}

void
sh7300se_outl(unsigned int value, unsigned long port)
{
	badio(outl, port);
}

void
sh7300se_insb(unsigned long port, void *addr, unsigned long count)
{
	unsigned char *a = addr;
	struct iop *p = port2iop(port);
	while (count--)
		*a++ = (p->inb) (p, port);
}

void
sh7300se_insw(unsigned long port, void *addr, unsigned long count)
{
	unsigned short *a = addr;
	struct iop *p = port2iop(port);
	while (count--)
		*a++ = (p->inw) (p, port);
}

void
sh7300se_insl(unsigned long port, void *addr, unsigned long count)
{
	badio(insl, port);
}

void
sh7300se_outsb(unsigned long port, const void *addr, unsigned long count)
{
	unsigned char *a = (unsigned char *) addr;
	struct iop *p = port2iop(port);
	while (count--)
		(p->outb) (p, *a++, port);
}

void
sh7300se_outsw(unsigned long port, const void *addr, unsigned long count)
{
	unsigned short *a = (unsigned short *) addr;
	struct iop *p = port2iop(port);
	while (count--)
		(p->outw) (p, *a++, port);
}

void
sh7300se_outsl(unsigned long port, const void *addr, unsigned long count)
{
	badio(outsw, port);
}

arch/sh/boards/se/7300/irq.c

deleted100644 → 0
+0 −40
Original line number Diff line number Diff line
/*
 * linux/arch/sh/boards/se/7300/irq.c
 *
 * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp>
 *
 * SH-Mobile SolutionEngine 7300 Support.
 *
 */

#include <linux/init.h>
#include <linux/irq.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/se7300.h>

static struct ipr_data se7300_ipr_map[] = {
	/* PC_IRQ[0-3] -> IRQ0 (32) */
	{ IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, 0x0f - IRQ0_IRQ },
	/* A_IRQ[0-3] -> IRQ1 (33) */
	{ IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, 0x0f - IRQ1_IRQ },
	{ SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY },
	{ DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY },
	{ DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY },
	{ VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY },
};

/*
 * Initialize IRQ setting
 */
void __init
init_7300se_IRQ(void)
{
	ctrl_outw(0x0028, PA_EPLD_MODESET);	/* mode set IRQ0,1 active low. */
	ctrl_outw(0xa000, INTC_ICR1);	        /* IRQ mode; IRQ0,1 enable.    */
	ctrl_outw(0x0000, PORT_PFCR);	        /* use F for IRQ[3:0] and SIU. */

	make_ipr_irq(se7300_ipr_map, ARRAY_SIZE(se7300_ipr_map));

	ctrl_outw(0x2000, PA_MRSHPC + 0x0c);	/* mrshpc irq enable */
}
Loading