diff options
Diffstat (limited to 'arch/sh/boards/mach-systemh')
| -rw-r--r-- | arch/sh/boards/mach-systemh/Makefile | 13 | ||||
| -rw-r--r-- | arch/sh/boards/mach-systemh/io.c | 158 | ||||
| -rw-r--r-- | arch/sh/boards/mach-systemh/irq.c | 61 | ||||
| -rw-r--r-- | arch/sh/boards/mach-systemh/setup.c | 57 | 
4 files changed, 0 insertions, 289 deletions
diff --git a/arch/sh/boards/mach-systemh/Makefile b/arch/sh/boards/mach-systemh/Makefile deleted file mode 100644 index 2cc6a23d9d3..00000000000 --- a/arch/sh/boards/mach-systemh/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# -# Makefile for the SystemH specific parts of the kernel -# - -obj-y	 := setup.o irq.o io.o - -# XXX: This wants to be consolidated in arch/sh/drivers/pci, and more -# importantly, with the generic sh7751_pcic_init() code. For now, we'll -# just abuse the hell out of kbuild, because we can.. - -obj-$(CONFIG_PCI) += pci.o -pci-y := ../../se/7751/pci.o - diff --git a/arch/sh/boards/mach-systemh/io.c b/arch/sh/boards/mach-systemh/io.c deleted file mode 100644 index 15577ff1f71..00000000000 --- a/arch/sh/boards/mach-systemh/io.c +++ /dev/null @@ -1,158 +0,0 @@ -/* - * linux/arch/sh/boards/renesas/systemh/io.c - * - * Copyright (C) 2001  Ian da Silva, Jeremy Siegel - * Based largely on io_se.c. - * - * I/O routine for Hitachi 7751 Systemh. - */ -#include <linux/kernel.h> -#include <linux/types.h> -#include <linux/pci.h> -#include <mach/systemh7751.h> -#include <asm/addrspace.h> -#include <asm/io.h> - -#define ETHER_IOMAP(adr) (0xB3000000 + (adr)) /*map to 16bits access area -                                                of smc lan chip*/ -static inline volatile __u16 * -port2adr(unsigned int port) -{ -	if (port >= 0x2000) -		return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000)); -	maybebadio((unsigned long)port); -	return (volatile __u16*)port; -} - -/* - * General outline: remap really low stuff [eventually] to SuperIO, - * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO) - * is mapped through the PCI IO window.  Stuff with high bits (PXSEG) - * should be way beyond the window, and is used  w/o translation for - * compatibility. - */ -unsigned char sh7751systemh_inb(unsigned long port) -{ -	if (PXSEG(port)) -		return *(volatile unsigned char *)port; -	else if (port <= 0x3F1) -		return *(volatile unsigned char *)ETHER_IOMAP(port); -	else -		return (*port2adr(port))&0xff; -} - -unsigned char sh7751systemh_inb_p(unsigned long port) -{ -	unsigned char v; - -        if (PXSEG(port)) -                v = *(volatile unsigned char *)port; -	else if (port <= 0x3F1) -		v = *(volatile unsigned char *)ETHER_IOMAP(port); -	else -		v = (*port2adr(port))&0xff; -	ctrl_delay(); -	return v; -} - -unsigned short sh7751systemh_inw(unsigned long port) -{ -        if (PXSEG(port)) -                return *(volatile unsigned short *)port; -	else if (port >= 0x2000) -		return *port2adr(port); -	else if (port <= 0x3F1) -		return *(volatile unsigned int *)ETHER_IOMAP(port); -	else -		maybebadio(port); -	return 0; -} - -unsigned int sh7751systemh_inl(unsigned long port) -{ -        if (PXSEG(port)) -                return *(volatile unsigned long *)port; -	else if (port >= 0x2000) -		return *port2adr(port); -	else if (port <= 0x3F1) -		return *(volatile unsigned int *)ETHER_IOMAP(port); -	else -		maybebadio(port); -	return 0; -} - -void sh7751systemh_outb(unsigned char value, unsigned long port) -{ - -        if (PXSEG(port)) -                *(volatile unsigned char *)port = value; -	else if (port <= 0x3F1) -		*(volatile unsigned char *)ETHER_IOMAP(port) = value; -	else -		*(port2adr(port)) = value; -} - -void sh7751systemh_outb_p(unsigned char value, unsigned long port) -{ -        if (PXSEG(port)) -                *(volatile unsigned char *)port = value; -	else if (port <= 0x3F1) -		*(volatile unsigned char *)ETHER_IOMAP(port) = value; -	else -		*(port2adr(port)) = value; -	ctrl_delay(); -} - -void sh7751systemh_outw(unsigned short value, unsigned long port) -{ -        if (PXSEG(port)) -                *(volatile unsigned short *)port = value; -	else if (port >= 0x2000) -		*port2adr(port) = value; -	else if (port <= 0x3F1) -		*(volatile unsigned short *)ETHER_IOMAP(port) = value; -	else -		maybebadio(port); -} - -void sh7751systemh_outl(unsigned int value, unsigned long port) -{ -        if (PXSEG(port)) -                *(volatile unsigned long *)port = value; -	else -		maybebadio(port); -} - -void sh7751systemh_insb(unsigned long port, void *addr, unsigned long count) -{ -	unsigned char *p = addr; -	while (count--) *p++ = sh7751systemh_inb(port); -} - -void sh7751systemh_insw(unsigned long port, void *addr, unsigned long count) -{ -	unsigned short *p = addr; -	while (count--) *p++ = sh7751systemh_inw(port); -} - -void sh7751systemh_insl(unsigned long port, void *addr, unsigned long count) -{ -	maybebadio(port); -} - -void sh7751systemh_outsb(unsigned long port, const void *addr, unsigned long count) -{ -	unsigned char *p = (unsigned char*)addr; -	while (count--) sh7751systemh_outb(*p++, port); -} - -void sh7751systemh_outsw(unsigned long port, const void *addr, unsigned long count) -{ -	unsigned short *p = (unsigned short*)addr; -	while (count--) sh7751systemh_outw(*p++, port); -} - -void sh7751systemh_outsl(unsigned long port, const void *addr, unsigned long count) -{ -	maybebadio(port); -} diff --git a/arch/sh/boards/mach-systemh/irq.c b/arch/sh/boards/mach-systemh/irq.c deleted file mode 100644 index e5ee13adeff..00000000000 --- a/arch/sh/boards/mach-systemh/irq.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * linux/arch/sh/boards/renesas/systemh/irq.c - * - * Copyright (C) 2000  Kazumoto Kojima - * - * Hitachi SystemH Support. - * - * Modified for 7751 SystemH by - * Jonathan Short. - */ - -#include <linux/init.h> -#include <linux/irq.h> -#include <linux/interrupt.h> -#include <linux/io.h> - -#include <mach/systemh7751.h> -#include <asm/smc37c93x.h> - -/* address of external interrupt mask register - * address must be set prior to use these (maybe in init_XXX_irq()) - * XXX : is it better to use .config than specifying it in code? */ -static unsigned long *systemh_irq_mask_register = (unsigned long *)0xB3F10004; -static unsigned long *systemh_irq_request_register = (unsigned long *)0xB3F10000; - -static void disable_systemh_irq(struct irq_data *data) -{ -	unsigned long val, mask = 0x01 << 1; - -	/* Clear the "irq"th bit in the mask and set it in the request */ -	val = __raw_readl((unsigned long)systemh_irq_mask_register); -	val &= ~mask; -	__raw_writel(val, (unsigned long)systemh_irq_mask_register); - -	val = __raw_readl((unsigned long)systemh_irq_request_register); -	val |= mask; -	__raw_writel(val, (unsigned long)systemh_irq_request_register); -} - -static void enable_systemh_irq(struct irq_data *data) -{ -	unsigned long val, mask = 0x01 << 1; - -	/* Set "irq"th bit in the mask register */ -	val = __raw_readl((unsigned long)systemh_irq_mask_register); -	val |= mask; -	__raw_writel(val, (unsigned long)systemh_irq_mask_register); -} - -static struct irq_chip systemh_irq_type = { -	.name		= "SystemH Register", -	.irq_unmask	= enable_systemh_irq, -	.irq_mask	= disable_systemh_irq, -}; - -void make_systemh_irq(unsigned int irq) -{ -	disable_irq_nosync(irq); -	set_irq_chip_and_handler(irq, &systemh_irq_type, handle_level_irq); -	disable_systemh_irq(irq_get_irq_data(irq)); -} diff --git a/arch/sh/boards/mach-systemh/setup.c b/arch/sh/boards/mach-systemh/setup.c deleted file mode 100644 index 219fd800a43..00000000000 --- a/arch/sh/boards/mach-systemh/setup.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * linux/arch/sh/boards/renesas/systemh/setup.c - * - * Copyright (C) 2000  Kazumoto Kojima - * Copyright (C) 2003  Paul Mundt - * - * Hitachi SystemH Support. - * - * Modified for 7751 SystemH by Jonathan Short. - * - * Rewritten for 2.6 by Paul Mundt. - * - * 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 archive - * for more details. - */ -#include <linux/init.h> -#include <asm/machvec.h> -#include <mach/systemh7751.h> - -extern void make_systemh_irq(unsigned int irq); - -/* - * Initialize IRQ setting - */ -static void __init sh7751systemh_init_irq(void) -{ -	make_systemh_irq(0xb);	/* Ethernet interrupt */ -} - -static struct sh_machine_vector mv_7751systemh __initmv = { -	.mv_name		= "7751 SystemH", -	.mv_nr_irqs		= 72, - -	.mv_inb			= sh7751systemh_inb, -	.mv_inw			= sh7751systemh_inw, -	.mv_inl			= sh7751systemh_inl, -	.mv_outb		= sh7751systemh_outb, -	.mv_outw		= sh7751systemh_outw, -	.mv_outl		= sh7751systemh_outl, - -	.mv_inb_p		= sh7751systemh_inb_p, -	.mv_inw_p		= sh7751systemh_inw, -	.mv_inl_p		= sh7751systemh_inl, -	.mv_outb_p		= sh7751systemh_outb_p, -	.mv_outw_p		= sh7751systemh_outw, -	.mv_outl_p		= sh7751systemh_outl, - -	.mv_insb		= sh7751systemh_insb, -	.mv_insw		= sh7751systemh_insw, -	.mv_insl		= sh7751systemh_insl, -	.mv_outsb		= sh7751systemh_outsb, -	.mv_outsw		= sh7751systemh_outsw, -	.mv_outsl		= sh7751systemh_outsl, - -	.mv_init_irq		= sh7751systemh_init_irq, -};  |