aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/boards/renesas/r7780rp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/renesas/r7780rp')
-rw-r--r--arch/sh/boards/renesas/r7780rp/Kconfig24
-rw-r--r--arch/sh/boards/renesas/r7780rp/Makefile10
-rw-r--r--arch/sh/boards/renesas/r7780rp/irq-r7780rp.c21
-rw-r--r--arch/sh/boards/renesas/r7780rp/irq-r7785rp.c29
-rw-r--r--arch/sh/boards/renesas/r7780rp/irq.c51
-rw-r--r--arch/sh/boards/renesas/r7780rp/psw.c122
-rw-r--r--arch/sh/boards/renesas/r7780rp/setup.c228
7 files changed, 0 insertions, 485 deletions
diff --git a/arch/sh/boards/renesas/r7780rp/Kconfig b/arch/sh/boards/renesas/r7780rp/Kconfig
deleted file mode 100644
index fc8f28e04ba..00000000000
--- a/arch/sh/boards/renesas/r7780rp/Kconfig
+++ /dev/null
@@ -1,24 +0,0 @@
-if SH_HIGHLANDER
-
-choice
- prompt "Highlander options"
- default SH_R7780MP
-
-config SH_R7780RP
- bool "R7780RP-1 board support"
- depends on CPU_SUBTYPE_SH7780
-
-config SH_R7780MP
- bool "R7780MP board support"
- depends on CPU_SUBTYPE_SH7780
- help
- Selecting this option will enable support for the mass-production
- version of the R7780RP. If in doubt, say Y.
-
-config SH_R7785RP
- bool "R7785RP board support"
- depends on CPU_SUBTYPE_SH7785
-
-endchoice
-
-endif
diff --git a/arch/sh/boards/renesas/r7780rp/Makefile b/arch/sh/boards/renesas/r7780rp/Makefile
deleted file mode 100644
index b1d20afb4eb..00000000000
--- a/arch/sh/boards/renesas/r7780rp/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile for the R7780RP-1 specific parts of the kernel
-#
-irqinit-y := irq-r7780rp.o
-irqinit-$(CONFIG_SH_R7785RP) := irq-r7785rp.o
-obj-y := setup.o irq.o $(irqinit-y)
-
-ifneq ($(CONFIG_SH_R7785RP),y)
-obj-$(CONFIG_PUSH_SWITCH) += psw.o
-endif
diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c b/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c
deleted file mode 100644
index f5f358746c9..00000000000
--- a/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Renesas Solutions Highlander R7780RP-1 Support.
- *
- * Copyright (C) 2002 Atom Create Engineering Co., Ltd.
- * Copyright (C) 2006 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/io.h>
-#include <asm/r7780rp.h>
-
-void __init highlander_init_irq(void)
-{
- int i;
-
- for (i = 0; i < 15; i++)
- make_r7780rp_irq(i);
-}
diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c b/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c
deleted file mode 100644
index dd6ec4ce44d..00000000000
--- a/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Renesas Solutions Highlander R7780RP-1 Support.
- *
- * Copyright (C) 2002 Atom Create Engineering Co., Ltd.
- * Copyright (C) 2006 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/io.h>
-#include <asm/r7780rp.h>
-
-void __init highlander_init_irq(void)
-{
- ctrl_outw(0x0000, PA_IRLSSR1); /* FPGA IRLSSR1(CF_CD clear) */
-
- /* Setup the FPGA IRL */
- ctrl_outw(0x0000, PA_IRLPRA); /* FPGA IRLA */
- ctrl_outw(0xe598, PA_IRLPRB); /* FPGA IRLB */
- ctrl_outw(0x7060, PA_IRLPRC); /* FPGA IRLC */
- ctrl_outw(0x0000, PA_IRLPRD); /* FPGA IRLD */
- ctrl_outw(0x4321, PA_IRLPRE); /* FPGA IRLE */
- ctrl_outw(0x0000, PA_IRLPRF); /* FPGA IRLF */
-
- make_r7780rp_irq(1); /* CF card */
- make_r7780rp_irq(10); /* On-board ethernet */
-}
diff --git a/arch/sh/boards/renesas/r7780rp/irq.c b/arch/sh/boards/renesas/r7780rp/irq.c
deleted file mode 100644
index e0b8eb52f37..00000000000
--- a/arch/sh/boards/renesas/r7780rp/irq.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Renesas Solutions Highlander R7780RP-1 Support.
- *
- * Copyright (C) 2002 Atom Create Engineering Co., Ltd.
- * Copyright (C) 2006 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 <linux/irq.h>
-#include <linux/interrupt.h>
-#include <linux/io.h>
-#include <asm/r7780rp.h>
-
-#ifdef CONFIG_SH_R7780RP
-static int mask_pos[] = {15, 14, 13, 12, 11, 10, 9, 8, 7, 5, 6, 4, 0, 1, 2, 0};
-#elif defined(CONFIG_SH_R7780MP)
-static int mask_pos[] = {12, 11, 9, 14, 15, 8, 13, 6, 5, 4, 3, 2, 0, 0, 1, 0};
-#elif defined(CONFIG_SH_R7785RP)
-static int mask_pos[] = {2, 11, 2, 2, 2, 2, 9, 8, 7, 5, 10, 2, 2, 2, 2, 2};
-#endif
-
-static void enable_r7780rp_irq(unsigned int irq)
-{
- /* Set priority in IPR back to original value */
- ctrl_outw(ctrl_inw(IRLCNTR1) | (1 << mask_pos[irq]), IRLCNTR1);
-}
-
-static void disable_r7780rp_irq(unsigned int irq)
-{
- /* Set the priority in IPR to 0 */
- ctrl_outw(ctrl_inw(IRLCNTR1) & (0xffff ^ (1 << mask_pos[irq])),
- IRLCNTR1);
-}
-
-static struct irq_chip r7780rp_irq_chip __read_mostly = {
- .name = "R7780RP",
- .mask = disable_r7780rp_irq,
- .unmask = enable_r7780rp_irq,
- .mask_ack = disable_r7780rp_irq,
-};
-
-void make_r7780rp_irq(unsigned int irq)
-{
- disable_irq_nosync(irq);
- set_irq_chip_and_handler_name(irq, &r7780rp_irq_chip,
- handle_level_irq, "level");
- enable_r7780rp_irq(irq);
-}
diff --git a/arch/sh/boards/renesas/r7780rp/psw.c b/arch/sh/boards/renesas/r7780rp/psw.c
deleted file mode 100644
index c844dfa5d58..00000000000
--- a/arch/sh/boards/renesas/r7780rp/psw.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * arch/sh/boards/renesas/r7780rp/psw.c
- *
- * push switch support for RDBRP-1/RDBREVRP-1 debug boards.
- *
- * Copyright (C) 2006 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/io.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/platform_device.h>
-#include <asm/mach/r7780rp.h>
-#include <asm/push-switch.h>
-
-static irqreturn_t psw_irq_handler(int irq, void *arg)
-{
- struct platform_device *pdev = arg;
- struct push_switch *psw = platform_get_drvdata(pdev);
- struct push_switch_platform_info *psw_info = pdev->dev.platform_data;
- unsigned int l, mask;
- int ret = 0;
-
- l = ctrl_inw(PA_DBSW);
-
- /* Nothing to do if there's no state change */
- if (psw->state) {
- ret = 1;
- goto out;
- }
-
- mask = l & 0x70;
- /* Figure out who raised it */
- if (mask & (1 << psw_info->bit)) {
- psw->state = !!(mask & (1 << psw_info->bit));
- if (psw->state) /* debounce */
- mod_timer(&psw->debounce, jiffies + 50);
-
- ret = 1;
- }
-
-out:
- /* Clear the switch IRQs */
- l |= (0x7 << 12);
- ctrl_outw(l, PA_DBSW);
-
- return IRQ_RETVAL(ret);
-}
-
-static struct resource psw_resources[] = {
- [0] = {
- .start = IRQ_PSW,
- .flags = IORESOURCE_IRQ,
- },
-};
-
-static struct push_switch_platform_info s2_platform_data = {
- .name = "s2",
- .bit = 6,
- .irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING |
- IRQF_SHARED,
- .irq_handler = psw_irq_handler,
-};
-
-static struct platform_device s2_switch_device = {
- .name = "push-switch",
- .id = 0,
- .num_resources = ARRAY_SIZE(psw_resources),
- .resource = psw_resources,
- .dev = {
- .platform_data = &s2_platform_data,
- },
-};
-
-static struct push_switch_platform_info s3_platform_data = {
- .name = "s3",
- .bit = 5,
- .irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING |
- IRQF_SHARED,
- .irq_handler = psw_irq_handler,
-};
-
-static struct platform_device s3_switch_device = {
- .name = "push-switch",
- .id = 1,
- .num_resources = ARRAY_SIZE(psw_resources),
- .resource = psw_resources,
- .dev = {
- .platform_data = &s3_platform_data,
- },
-};
-
-static struct push_switch_platform_info s4_platform_data = {
- .name = "s4",
- .bit = 4,
- .irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING |
- IRQF_SHARED,
- .irq_handler = psw_irq_handler,
-};
-
-static struct platform_device s4_switch_device = {
- .name = "push-switch",
- .id = 2,
- .num_resources = ARRAY_SIZE(psw_resources),
- .resource = psw_resources,
- .dev = {
- .platform_data = &s4_platform_data,
- },
-};
-
-static struct platform_device *psw_devices[] = {
- &s2_switch_device, &s3_switch_device, &s4_switch_device,
-};
-
-static int __init psw_init(void)
-{
- return platform_add_devices(psw_devices, ARRAY_SIZE(psw_devices));
-}
-module_init(psw_init);
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
deleted file mode 100644
index adb529d01ba..00000000000
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * arch/sh/boards/renesas/r7780rp/setup.c
- *
- * Renesas Solutions Highlander Support.
- *
- * Copyright (C) 2002 Atom Create Engineering Co., Ltd.
- * Copyright (C) 2005 - 2007 Paul Mundt
- *
- * This contains support for the R7780RP-1, R7780MP, and R7785RP
- * Highlander modules.
- *
- * 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 <linux/platform_device.h>
-#include <linux/pata_platform.h>
-#include <asm/machvec.h>
-#include <asm/r7780rp.h>
-#include <asm/clock.h>
-#include <asm/io.h>
-
-static struct resource r8a66597_usb_host_resources[] = {
- [0] = {
- .name = "r8a66597_hcd",
- .start = 0xA4200000,
- .end = 0xA42000FF,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .name = "r8a66597_hcd",
- .start = 11, /* irq number */
- .end = 11,
- .flags = IORESOURCE_IRQ,
- },
-};
-
-static struct platform_device r8a66597_usb_host_device = {
- .name = "r8a66597_hcd",
- .id = -1,
- .dev = {
- .dma_mask = NULL, /* don't use dma */
- .coherent_dma_mask = 0xffffffff,
- },
- .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources),
- .resource = r8a66597_usb_host_resources,
-};
-
-static struct resource m66592_usb_peripheral_resources[] = {
- [0] = {
- .name = "m66592_udc",
- .start = 0xb0000000,
- .end = 0xb00000FF,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .name = "m66592_udc",
- .start = 9, /* irq number */
- .end = 9,
- .flags = IORESOURCE_IRQ,
- },
-};
-
-static struct platform_device m66592_usb_peripheral_device = {
- .name = "m66592_udc",
- .id = -1,
- .dev = {
- .dma_mask = NULL, /* don't use dma */
- .coherent_dma_mask = 0xffffffff,
- },
- .num_resources = ARRAY_SIZE(m66592_usb_peripheral_resources),
- .resource = m66592_usb_peripheral_resources,
-};
-
-static struct resource cf_ide_resources[] = {
- [0] = {
- .start = PA_AREA5_IO + 0x1000,
- .end = PA_AREA5_IO + 0x1000 + 0x08 - 1,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = PA_AREA5_IO + 0x80c,
- .end = PA_AREA5_IO + 0x80c + 0x16 - 1,
- .flags = IORESOURCE_MEM,
- },
- [2] = {
-#ifdef CONFIG_SH_R7780RP
- .start = 4,
-#else
- .start = 1,
-#endif
- .flags = IORESOURCE_IRQ,
- },
-};
-
-static struct pata_platform_info pata_info = {
- .ioport_shift = 1,
-};
-
-static struct platform_device cf_ide_device = {
- .name = "pata_platform",
- .id = -1,
- .num_resources = ARRAY_SIZE(cf_ide_resources),
- .resource = cf_ide_resources,
- .dev = {
- .platform_data = &pata_info,
- },
-};
-
-static unsigned char heartbeat_bit_pos[] = { 2, 1, 0, 3, 6, 5, 4, 7 };
-
-static struct resource heartbeat_resources[] = {
- [0] = {
- .start = PA_OBLED,
- .end = PA_OBLED + ARRAY_SIZE(heartbeat_bit_pos) - 1,
- .flags = IORESOURCE_MEM,
- },
-};
-
-static struct platform_device heartbeat_device = {
- .name = "heartbeat",
- .id = -1,
-
- /* R7785RP has a slightly more sensible FPGA.. */
-#ifndef CONFIG_SH_R7785RP
- .dev = {
- .platform_data = heartbeat_bit_pos,
- },
-#endif
- .num_resources = ARRAY_SIZE(heartbeat_resources),
- .resource = heartbeat_resources,
-};
-
-static struct platform_device *r7780rp_devices[] __initdata = {
- &r8a66597_usb_host_device,
- &m66592_usb_peripheral_device,
- &cf_ide_device,
- &heartbeat_device,
-};
-
-static int __init r7780rp_devices_setup(void)
-{
- return platform_add_devices(r7780rp_devices,
- ARRAY_SIZE(r7780rp_devices));
-}
-device_initcall(r7780rp_devices_setup);
-
-/*
- * Platform specific clocks
- */
-static void ivdr_clk_enable(struct clk *clk)
-{
- ctrl_outw(ctrl_inw(PA_IVDRCTL) | (1 << IVDR_CK_ON), PA_IVDRCTL);
-}
-
-static void ivdr_clk_disable(struct clk *clk)
-{
- ctrl_outw(ctrl_inw(PA_IVDRCTL) & ~(1 << IVDR_CK_ON), PA_IVDRCTL);
-}
-
-static struct clk_ops ivdr_clk_ops = {
- .enable = ivdr_clk_enable,
- .disable = ivdr_clk_disable,
-};
-
-static struct clk ivdr_clk = {
- .name = "ivdr_clk",
- .ops = &ivdr_clk_ops,
-};
-
-static struct clk *r7780rp_clocks[] = {
- &ivdr_clk,
-};
-
-static void r7780rp_power_off(void)
-{
- if (mach_is_r7780mp() || mach_is_r7785rp())
- ctrl_outw(0x0001, PA_POFF);
-}
-
-/*
- * Initialize the board
- */
-static void __init highlander_setup(char **cmdline_p)
-{
- u16 ver = ctrl_inw(PA_VERREG);
- int i;
-
- printk(KERN_INFO "Renesas Solutions Highlander %s support.\n",
- mach_is_r7780rp() ? "R7780RP-1" :
- mach_is_r7780mp() ? "R7780MP" :
- "R7785RP");
-
- printk(KERN_INFO "Board version: %d (revision %d), "
- "FPGA version: %d (revision %d)\n",
- (ver >> 12) & 0xf, (ver >> 8) & 0xf,
- (ver >> 4) & 0xf, ver & 0xf);
-
- /*
- * Enable the important clocks right away..
- */
- for (i = 0; i < ARRAY_SIZE(r7780rp_clocks); i++) {
- struct clk *clk = r7780rp_clocks[i];
-
- clk_register(clk);
- clk_enable(clk);
- }
-
- ctrl_outw(0x0000, PA_OBLED); /* Clear LED. */
-
- if (mach_is_r7780rp())
- ctrl_outw(0x0001, PA_SDPOW); /* SD Power ON */
-
- ctrl_outw(ctrl_inw(PA_IVDRCTL) | 0x01, PA_IVDRCTL); /* Si13112 */
-
- pm_power_off = r7780rp_power_off;
-}
-
-/*
- * The Machine Vector
- */
-static struct sh_machine_vector mv_highlander __initmv = {
- .mv_name = "Highlander",
- .mv_nr_irqs = 109,
- .mv_setup = highlander_setup,
- .mv_init_irq = highlander_init_irq,
-};