diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-07-29 21:01:19 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-29 21:01:19 +0900 |
commit | da2014a2b080e7f3024a4eb6917d47069ad9620b (patch) | |
tree | cfde12c6d4b5baa222966b14a676f107992cf786 /arch/sh/boards/se/7206 | |
parent | 71b8064e7df5698520d73b4c1566a3dbc98eb9ef (diff) | |
download | linux-3.10-da2014a2b080e7f3024a4eb6917d47069ad9620b.tar.gz linux-3.10-da2014a2b080e7f3024a4eb6917d47069ad9620b.tar.bz2 linux-3.10-da2014a2b080e7f3024a4eb6917d47069ad9620b.zip |
sh: Shuffle the board directories in to mach groups.
This flattens out the board directories in to individual mach groups,
we will use this for getting rid of unneeded directories, simplifying
the build system, and becoming more coherent with the refactored
arch/sh/include topology.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/se/7206')
-rw-r--r-- | arch/sh/boards/se/7206/Makefile | 5 | ||||
-rw-r--r-- | arch/sh/boards/se/7206/io.c | 104 | ||||
-rw-r--r-- | arch/sh/boards/se/7206/irq.c | 146 | ||||
-rw-r--r-- | arch/sh/boards/se/7206/setup.c | 108 |
4 files changed, 0 insertions, 363 deletions
diff --git a/arch/sh/boards/se/7206/Makefile b/arch/sh/boards/se/7206/Makefile deleted file mode 100644 index 63e7ed699f3..00000000000 --- a/arch/sh/boards/se/7206/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# -# Makefile for the 7206 SolutionEngine specific parts of the kernel -# - -obj-y := setup.o io.o irq.o diff --git a/arch/sh/boards/se/7206/io.c b/arch/sh/boards/se/7206/io.c deleted file mode 100644 index 1308e618e04..00000000000 --- a/arch/sh/boards/se/7206/io.c +++ /dev/null @@ -1,104 +0,0 @@ -/* $Id: io.c,v 1.5 2004/02/22 23:08:43 kkojima Exp $ - * - * linux/arch/sh/boards/se/7206/io.c - * - * Copyright (C) 2006 Yoshinori Sato - * - * I/O routine for Hitachi 7206 SolutionEngine. - * - */ - -#include <linux/kernel.h> -#include <linux/types.h> -#include <asm/io.h> -#include <asm/se7206.h> - - -static inline void delay(void) -{ - ctrl_inw(0x20000000); /* P2 ROM Area */ -} - -/* MS7750 requires special versions of in*, out* routines, since - PC-like io ports are located at upper half byte of 16-bit word which - can be accessed only with 16-bit wide. */ - -static inline volatile __u16 * -port2adr(unsigned int port) -{ - if (port >= 0x2000 && port < 0x2020) - return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000)); - else if (port >= 0x300 && port < 0x310) - return (volatile __u16 *) (PA_SMSC + (port - 0x300)); - - return (volatile __u16 *)port; -} - -unsigned char se7206_inb(unsigned long port) -{ - return (*port2adr(port)) & 0xff; -} - -unsigned char se7206_inb_p(unsigned long port) -{ - unsigned long v; - - v = (*port2adr(port)) & 0xff; - delay(); - return v; -} - -unsigned short se7206_inw(unsigned long port) -{ - return *port2adr(port);; -} - -void se7206_outb(unsigned char value, unsigned long port) -{ - *(port2adr(port)) = value; -} - -void se7206_outb_p(unsigned char value, unsigned long port) -{ - *(port2adr(port)) = value; - delay(); -} - -void se7206_outw(unsigned short value, unsigned long port) -{ - *port2adr(port) = value; -} - -void se7206_insb(unsigned long port, void *addr, unsigned long count) -{ - volatile __u16 *p = port2adr(port); - __u8 *ap = addr; - - while (count--) - *ap++ = *p; -} - -void se7206_insw(unsigned long port, void *addr, unsigned long count) -{ - volatile __u16 *p = port2adr(port); - __u16 *ap = addr; - while (count--) - *ap++ = *p; -} - -void se7206_outsb(unsigned long port, const void *addr, unsigned long count) -{ - volatile __u16 *p = port2adr(port); - const __u8 *ap = addr; - - while (count--) - *p = *ap++; -} - -void se7206_outsw(unsigned long port, const void *addr, unsigned long count) -{ - volatile __u16 *p = port2adr(port); - const __u16 *ap = addr; - while (count--) - *p = *ap++; -} diff --git a/arch/sh/boards/se/7206/irq.c b/arch/sh/boards/se/7206/irq.c deleted file mode 100644 index 9d5bfc77d0d..00000000000 --- a/arch/sh/boards/se/7206/irq.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * linux/arch/sh/boards/se/7206/irq.c - * - * Copyright (C) 2005,2006 Yoshinori Sato - * - * Hitachi SolutionEngine Support. - * - */ -#include <linux/init.h> -#include <linux/irq.h> -#include <linux/io.h> -#include <linux/interrupt.h> -#include <asm/se7206.h> - -#define INTSTS0 0x31800000 -#define INTSTS1 0x31800002 -#define INTMSK0 0x31800004 -#define INTMSK1 0x31800006 -#define INTSEL 0x31800008 - -#define IRQ0_IRQ 64 -#define IRQ1_IRQ 65 -#define IRQ3_IRQ 67 - -#define INTC_IPR01 0xfffe0818 -#define INTC_ICR1 0xfffe0802 - -static void disable_se7206_irq(unsigned int irq) -{ - unsigned short val; - unsigned short mask = 0xffff ^ (0x0f << 4 * (3 - (IRQ0_IRQ - irq))); - unsigned short msk0,msk1; - - /* Set the priority in IPR to 0 */ - val = ctrl_inw(INTC_IPR01); - val &= mask; - ctrl_outw(val, INTC_IPR01); - /* FPGA mask set */ - msk0 = ctrl_inw(INTMSK0); - msk1 = ctrl_inw(INTMSK1); - - switch (irq) { - case IRQ0_IRQ: - msk0 |= 0x0010; - break; - case IRQ1_IRQ: - msk0 |= 0x000f; - break; - case IRQ3_IRQ: - msk0 |= 0x0f00; - msk1 |= 0x00ff; - break; - } - ctrl_outw(msk0, INTMSK0); - ctrl_outw(msk1, INTMSK1); -} - -static void enable_se7206_irq(unsigned int irq) -{ - unsigned short val; - unsigned short value = (0x0001 << 4 * (3 - (IRQ0_IRQ - irq))); - unsigned short msk0,msk1; - - /* Set priority in IPR back to original value */ - val = ctrl_inw(INTC_IPR01); - val |= value; - ctrl_outw(val, INTC_IPR01); - - /* FPGA mask reset */ - msk0 = ctrl_inw(INTMSK0); - msk1 = ctrl_inw(INTMSK1); - - switch (irq) { - case IRQ0_IRQ: - msk0 &= ~0x0010; - break; - case IRQ1_IRQ: - msk0 &= ~0x000f; - break; - case IRQ3_IRQ: - msk0 &= ~0x0f00; - msk1 &= ~0x00ff; - break; - } - ctrl_outw(msk0, INTMSK0); - ctrl_outw(msk1, INTMSK1); -} - -static void eoi_se7206_irq(unsigned int irq) -{ - unsigned short sts0,sts1; - - if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) - enable_se7206_irq(irq); - /* FPGA isr clear */ - sts0 = ctrl_inw(INTSTS0); - sts1 = ctrl_inw(INTSTS1); - - switch (irq) { - case IRQ0_IRQ: - sts0 &= ~0x0010; - break; - case IRQ1_IRQ: - sts0 &= ~0x000f; - break; - case IRQ3_IRQ: - sts0 &= ~0x0f00; - sts1 &= ~0x00ff; - break; - } - ctrl_outw(sts0, INTSTS0); - ctrl_outw(sts1, INTSTS1); -} - -static struct irq_chip se7206_irq_chip __read_mostly = { - .name = "SE7206-FPGA", - .mask = disable_se7206_irq, - .unmask = enable_se7206_irq, - .mask_ack = disable_se7206_irq, - .eoi = eoi_se7206_irq, -}; - -static void make_se7206_irq(unsigned int irq) -{ - disable_irq_nosync(irq); - set_irq_chip_and_handler_name(irq, &se7206_irq_chip, - handle_level_irq, "level"); - disable_se7206_irq(irq); -} - -/* - * Initialize IRQ setting - */ -void __init init_se7206_IRQ(void) -{ - make_se7206_irq(IRQ0_IRQ); /* SMC91C111 */ - make_se7206_irq(IRQ1_IRQ); /* ATA */ - make_se7206_irq(IRQ3_IRQ); /* SLOT / PCM */ - ctrl_outw(inw(INTC_ICR1) | 0x000b ,INTC_ICR1 ) ; /* ICR1 */ - - /* FPGA System register setup*/ - ctrl_outw(0x0000,INTSTS0); /* Clear INTSTS0 */ - ctrl_outw(0x0000,INTSTS1); /* Clear INTSTS1 */ - /* IRQ0=LAN, IRQ1=ATA, IRQ3=SLT,PCM */ - ctrl_outw(0x0001,INTSEL); -} diff --git a/arch/sh/boards/se/7206/setup.c b/arch/sh/boards/se/7206/setup.c deleted file mode 100644 index 4fe84cc0840..00000000000 --- a/arch/sh/boards/se/7206/setup.c +++ /dev/null @@ -1,108 +0,0 @@ -/* - * - * linux/arch/sh/boards/se/7206/setup.c - * - * Copyright (C) 2006 Yoshinori Sato - * Copyright (C) 2007 - 2008 Paul Mundt - * - * Hitachi 7206 SolutionEngine Support. - */ -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/smc91x.h> -#include <asm/se7206.h> -#include <asm/io.h> -#include <asm/machvec.h> -#include <asm/heartbeat.h> - -static struct resource smc91x_resources[] = { - [0] = { - .name = "smc91x-regs", - .start = PA_SMSC + 0x300, - .end = PA_SMSC + 0x300 + 0x020 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = 64, - .end = 64, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct smc91x_platdata smc91x_info = { - .flags = SMC91X_USE_16BIT, -}; - -static struct platform_device smc91x_device = { - .name = "smc91x", - .id = -1, - .dev = { - .dma_mask = NULL, - .coherent_dma_mask = 0xffffffff, - .platform_data = &smc91x_info, - }, - .num_resources = ARRAY_SIZE(smc91x_resources), - .resource = smc91x_resources, -}; - -static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 }; - -static struct heartbeat_data heartbeat_data = { - .bit_pos = heartbeat_bit_pos, - .nr_bits = ARRAY_SIZE(heartbeat_bit_pos), - .regsize = 32, -}; - -static struct resource heartbeat_resources[] = { - [0] = { - .start = PA_LED, - .end = PA_LED, - .flags = IORESOURCE_MEM, - }, -}; - -static struct platform_device heartbeat_device = { - .name = "heartbeat", - .id = -1, - .dev = { - .platform_data = &heartbeat_data, - }, - .num_resources = ARRAY_SIZE(heartbeat_resources), - .resource = heartbeat_resources, -}; - -static struct platform_device *se7206_devices[] __initdata = { - &smc91x_device, - &heartbeat_device, -}; - -static int __init se7206_devices_setup(void) -{ - return platform_add_devices(se7206_devices, ARRAY_SIZE(se7206_devices)); -} -__initcall(se7206_devices_setup); - -/* - * The Machine Vector - */ - -static struct sh_machine_vector mv_se __initmv = { - .mv_name = "SolutionEngine", - .mv_nr_irqs = 256, - .mv_inb = se7206_inb, - .mv_inw = se7206_inw, - .mv_outb = se7206_outb, - .mv_outw = se7206_outw, - - .mv_inb_p = se7206_inb_p, - .mv_inw_p = se7206_inw, - .mv_outb_p = se7206_outb_p, - .mv_outw_p = se7206_outw, - - .mv_insb = se7206_insb, - .mv_insw = se7206_insw, - .mv_outsb = se7206_outsb, - .mv_outsw = se7206_outsw, - - .mv_init_irq = init_se7206_IRQ, -}; |