summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-09-23 18:04:40 +0000
committerArnd Bergmann <arnd@arndb.de>2012-09-28 21:40:31 +0200
commitabbb0db2bd9d0bbfad3219604045168c50180539 (patch)
treed7c370e8ea9d507de1e8f60241355f50dab3c62e
parent0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff)
ARM: Remove mach-bcmring
Remove mach-bcmring as this is no longer maintained or used. Signed-off-by: Christian Daudt <csd@broadcom.com> Reviewed-by: Jiandong Zheng <jdzheng@broadcom.com> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--MAINTAINERS16
-rw-r--r--arch/arm/Kconfig14
-rw-r--r--arch/arm/Makefile1
-rw-r--r--arch/arm/configs/bcmring_defconfig79
-rw-r--r--arch/arm/mach-bcmring/Kconfig19
-rw-r--r--arch/arm/mach-bcmring/Makefile8
-rw-r--r--arch/arm/mach-bcmring/Makefile.boot6
-rw-r--r--arch/arm/mach-bcmring/arch.c199
-rw-r--r--arch/arm/mach-bcmring/clock.c223
-rw-r--r--arch/arm/mach-bcmring/clock.h33
-rw-r--r--arch/arm/mach-bcmring/core.c228
-rw-r--r--arch/arm/mach-bcmring/core.h31
-rw-r--r--arch/arm/mach-bcmring/csp/Makefile3
-rw-r--r--arch/arm/mach-bcmring/csp/chipc/Makefile1
-rw-r--r--arch/arm/mach-bcmring/csp/chipc/chipcHw.c776
-rw-r--r--arch/arm/mach-bcmring/csp/chipc/chipcHw_init.c293
-rw-r--r--arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c124
-rw-r--r--arch/arm/mach-bcmring/csp/chipc/chipcHw_str.c64
-rw-r--r--arch/arm/mach-bcmring/csp/dmac/Makefile1
-rw-r--r--arch/arm/mach-bcmring/csp/dmac/dmacHw.c917
-rw-r--r--arch/arm/mach-bcmring/csp/dmac/dmacHw_extra.c1017
-rw-r--r--arch/arm/mach-bcmring/csp/tmr/Makefile1
-rw-r--r--arch/arm/mach-bcmring/csp/tmr/tmrHw.c576
-rw-r--r--arch/arm/mach-bcmring/dma.c1518
-rw-r--r--arch/arm/mach-bcmring/dma_device.c593
-rw-r--r--arch/arm/mach-bcmring/include/cfg_global_defines.h40
-rw-r--r--arch/arm/mach-bcmring/include/csp/dmacHw.h596
-rw-r--r--arch/arm/mach-bcmring/include/csp/reg.h114
-rw-r--r--arch/arm/mach-bcmring/include/csp/tmrHw.h263
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/cap.h63
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/cap_inline.h409
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/chipcHw_def.h1123
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/chipcHw_inline.h1673
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/chipcHw_reg.h530
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/ddrcReg.h872
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/dmacHw_priv.h145
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/dmacHw_reg.h406
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/hw_cfg.h73
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/intcHw_reg.h246
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/mm_addr.h101
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/mm_io.h147
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/secHw_def.h100
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/secHw_inline.h79
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/tmrHw_reg.h82
-rw-r--r--arch/arm/mach-bcmring/include/mach/dma.h630
-rw-r--r--arch/arm/mach-bcmring/include/mach/entry-macro.S76
-rw-r--r--arch/arm/mach-bcmring/include/mach/hardware.h57
-rw-r--r--arch/arm/mach-bcmring/include/mach/irqs.h132
-rw-r--r--arch/arm/mach-bcmring/include/mach/memory_settings.h67
-rw-r--r--arch/arm/mach-bcmring/include/mach/reg_nand.h66
-rw-r--r--arch/arm/mach-bcmring/include/mach/reg_umi.h237
-rw-r--r--arch/arm/mach-bcmring/include/mach/timer.h77
-rw-r--r--arch/arm/mach-bcmring/include/mach/timex.h25
-rw-r--r--arch/arm/mach-bcmring/include/mach/uncompress.h43
-rw-r--r--arch/arm/mach-bcmring/irq.c126
-rw-r--r--arch/arm/mach-bcmring/mm.c60
-rw-r--r--arch/arm/mach-bcmring/timer.c61
57 files changed, 0 insertions, 15460 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 94b823f71e94..c908a8c73b51 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -658,22 +658,6 @@ W: http://www.linux4sam.org
S: Supported
F: arch/arm/mach-at91/
-ARM/BCMRING ARM ARCHITECTURE
-M: Jiandong Zheng <jdzheng@broadcom.com>
-M: Scott Branden <sbranden@broadcom.com>
-L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
-S: Maintained
-F: arch/arm/mach-bcmring
-
-ARM/BCMRING MTD NAND DRIVER
-M: Jiandong Zheng <jdzheng@broadcom.com>
-M: Scott Branden <sbranden@broadcom.com>
-L: linux-mtd@lists.infradead.org
-S: Maintained
-F: drivers/mtd/nand/bcm_umi_nand.c
-F: drivers/mtd/nand/bcm_umi_bch.c
-F: drivers/mtd/nand/nand_bcm_umi.h
-
ARM/CALXEDA HIGHBANK ARCHITECTURE
M: Rob Herring <rob.herring@calxeda.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e91c7cdc6fe5..ce61f4a6fc4a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -356,18 +356,6 @@ config ARCH_AT91
This enables support for systems based on Atmel
AT91RM9200 and AT91SAM9* processors.
-config ARCH_BCMRING
- bool "Broadcom BCMRING"
- depends on MMU
- select CPU_V6
- select ARM_AMBA
- select ARM_TIMER_SP804
- select CLKDEV_LOOKUP
- select GENERIC_CLOCKEVENTS
- select ARCH_WANT_OPTIONAL_GPIOLIB
- help
- Support for Broadcom's BCMRing platform.
-
config ARCH_HIGHBANK
bool "Calxeda Highbank-based"
select ARCH_WANT_OPTIONAL_GPIOLIB
@@ -1037,8 +1025,6 @@ source "arch/arm/mach-mvebu/Kconfig"
source "arch/arm/mach-at91/Kconfig"
-source "arch/arm/mach-bcmring/Kconfig"
-
source "arch/arm/mach-clps711x/Kconfig"
source "arch/arm/mach-cns3xxx/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 30eae87ead6d..8383e2ed6906 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -136,7 +136,6 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
# Machine directory name. This list is sorted alphanumerically
# by CONFIG_* macro name.
machine-$(CONFIG_ARCH_AT91) := at91
-machine-$(CONFIG_ARCH_BCMRING) := bcmring
machine-$(CONFIG_ARCH_CLPS711X) := clps711x
machine-$(CONFIG_ARCH_CNS3XXX) := cns3xxx
machine-$(CONFIG_ARCH_DAVINCI) := davinci
diff --git a/arch/arm/configs/bcmring_defconfig b/arch/arm/configs/bcmring_defconfig
deleted file mode 100644
index 9e6a8fe13164..000000000000
--- a/arch/arm/configs/bcmring_defconfig
+++ /dev/null
@@ -1,79 +0,0 @@
-CONFIG_EXPERIMENTAL=y
-# CONFIG_LOCALVERSION_AUTO is not set
-# CONFIG_SWAP is not set
-CONFIG_SYSVIPC=y
-CONFIG_EXPERT=y
-CONFIG_KALLSYMS_EXTRA_PASS=y
-# CONFIG_HOTPLUG is not set
-# CONFIG_ELF_CORE is not set
-# CONFIG_EPOLL is not set
-# CONFIG_SIGNALFD is not set
-# CONFIG_TIMERFD is not set
-# CONFIG_EVENTFD is not set
-# CONFIG_AIO is not set
-CONFIG_PERF_EVENTS=y
-# CONFIG_VM_EVENT_COUNTERS is not set
-# CONFIG_SLUB_DEBUG is not set
-# CONFIG_COMPAT_BRK is not set
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_BLK_DEV_BSG is not set
-# CONFIG_IOSCHED_DEADLINE is not set
-# CONFIG_IOSCHED_CFQ is not set
-CONFIG_ARCH_BCMRING=y
-CONFIG_BCM_ZRELADDR=0x8000
-CONFIG_CPU_32v6K=y
-CONFIG_NO_HZ=y
-CONFIG_PREEMPT=y
-CONFIG_AEABI=y
-# CONFIG_OABI_COMPAT is not set
-CONFIG_UACCESS_WITH_MEMCPY=y
-CONFIG_ZBOOT_ROM_TEXT=0x0e000000
-CONFIG_ZBOOT_ROM_BSS=0x0ea00000
-CONFIG_ZBOOT_ROM=y
-CONFIG_NET=y
-# CONFIG_WIRELESS is not set
-CONFIG_MTD=y
-CONFIG_MTD_CONCAT=y
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLOCK=y
-CONFIG_MTD_CFI=y
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_GEOMETRY=y
-# CONFIG_MTD_CFI_I2 is not set
-CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_VERIFY_WRITE=y
-CONFIG_MTD_NAND_BCM_UMI=y
-CONFIG_MTD_NAND_BCM_UMI_HWCS=y
-# CONFIG_MISC_DEVICES is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_KEYBOARD is not set
-# CONFIG_INPUT_MOUSE is not set
-# CONFIG_SERIO is not set
-# CONFIG_CONSOLE_TRANSLATIONS is not set
-# CONFIG_DEVKMEM is not set
-CONFIG_SERIAL_AMBA_PL011=y
-CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
-CONFIG_LEGACY_PTY_COUNT=64
-# CONFIG_HW_RANDOM is not set
-# CONFIG_HWMON is not set
-# CONFIG_VGA_CONSOLE is not set
-# CONFIG_HID_SUPPORT is not set
-# CONFIG_USB_SUPPORT is not set
-# CONFIG_FILE_LOCKING is not set
-# CONFIG_DNOTIFY is not set
-# CONFIG_INOTIFY_USER is not set
-# CONFIG_PROC_PAGE_MONITOR is not set
-CONFIG_TMPFS=y
-CONFIG_JFFS2_FS=y
-CONFIG_JFFS2_SUMMARY=y
-CONFIG_JFFS2_FS_XATTR=y
-# CONFIG_JFFS2_FS_SECURITY is not set
-# CONFIG_NETWORK_FILESYSTEMS is not set
-# CONFIG_ENABLE_WARN_DEPRECATED is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_HEADERS_CHECK=y
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
-# CONFIG_ARM_UNWIND is not set
diff --git a/arch/arm/mach-bcmring/Kconfig b/arch/arm/mach-bcmring/Kconfig
deleted file mode 100644
index 9170d16dca50..000000000000
--- a/arch/arm/mach-bcmring/Kconfig
+++ /dev/null
@@ -1,19 +0,0 @@
-choice
- prompt "Processor selection in BCMRING family of devices"
- depends on ARCH_BCMRING
- default ARCH_BCM11107
-
-config ARCH_FPGA11107
- bool "FPGA11107"
-
-config ARCH_BCM11107
- bool "BCM11107"
-endchoice
-
-menu "BCMRING Options"
- depends on ARCH_BCMRING
-
-config BCM_ZRELADDR
- hex "Compressed ZREL ADDR"
-
-endmenu
diff --git a/arch/arm/mach-bcmring/Makefile b/arch/arm/mach-bcmring/Makefile
deleted file mode 100644
index f8d9fcedf917..000000000000
--- a/arch/arm/mach-bcmring/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# Makefile for the linux kernel.
-#
-
-# Object file lists.
-
-obj-y := arch.o mm.o irq.o clock.o core.o timer.o dma.o
-obj-y += csp/
diff --git a/arch/arm/mach-bcmring/Makefile.boot b/arch/arm/mach-bcmring/Makefile.boot
deleted file mode 100644
index aef2467757fa..000000000000
--- a/arch/arm/mach-bcmring/Makefile.boot
+++ /dev/null
@@ -1,6 +0,0 @@
-# Address where decompressor will be written and eventually executed.
-#
-# default to SDRAM
-zreladdr-y += $(CONFIG_BCM_ZRELADDR)
-params_phys-y := 0x00000800
-
diff --git a/arch/arm/mach-bcmring/arch.c b/arch/arm/mach-bcmring/arch.c
deleted file mode 100644
index 45c97b1ee9b1..000000000000
--- a/arch/arm/mach-bcmring/arch.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*****************************************************************************
-* Copyright 2003 - 2008 Broadcom Corporation. All rights reserved.
-*
-* Unless you and Broadcom execute a separate written software license
-* agreement governing use of this software, this software is licensed to you
-* under the terms of the GNU General Public License version 2, available at
-* http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
-*
-* Notwithstanding the above, under no circumstances may you combine this
-* software in any way with any other Broadcom software provided under a
-* license other than the GPL, without Broadcom's express prior written
-* consent.
-*****************************************************************************/
-
-#include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/types.h>
-#include <linux/sched.h>
-#include <linux/interrupt.h>
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/spinlock.h>
-#include <linux/module.h>
-
-#include <linux/proc_fs.h>
-#include <linux/sysctl.h>
-
-#include <asm/irq.h>
-#include <asm/setup.h>
-#include <asm/mach-types.h>
-#include <asm/mach/time.h>
-#include <asm/pmu.h>
-
-#include <asm/mach/arch.h>
-#include <mach/dma.h>
-#include <mach/hardware.h>
-#include <mach/csp/mm_io.h>
-#include <mach/csp/chipcHw_def.h>
-#include <mach/csp/chipcHw_inline.h>
-
-#include <cfg_global.h>
-
-#include "core.h"
-
-HW_DECLARE_SPINLOCK(arch)
-HW_DECLARE_SPINLOCK(gpio)
-#if defined(CONFIG_DEBUG_SPINLOCK)
- EXPORT_SYMBOL(bcmring_gpio_reg_lock);
-#endif
-
-/* sysctl */
-static int bcmring_arch_warm_reboot; /* do a warm reboot on hard reset */
-
-static void bcmring_restart(char mode, const char *cmd)
-{
- printk("arch_reset:%c %x\n", mode, bcmring_arch_warm_reboot);
-
- if (mode == 'h') {
- /* Reboot configured in proc entry */
- if (bcmring_arch_warm_reboot) {
- printk("warm reset\n");
- /* Issue Warm reset (do not reset ethernet switch, keep alive) */
- chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_WARM);
- } else {
- /* Force reset of everything */
- printk("force reset\n");
- chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_SOFT);
- }
- } else {
- /* Force reset of everything */
- printk("force reset\n");
- chipcHw_reset(chipcHw_REG_SOFT_RESET_CHIP_SOFT);
- }
-}
-
-static struct ctl_table_header *bcmring_sysctl_header;
-
-static struct ctl_table bcmring_sysctl_warm_reboot[] = {
- {
- .procname = "warm",
- .data = &bcmring_arch_warm_reboot,
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec},
- {}
-};
-
-static struct ctl_table bcmring_sysctl_reboot[] = {
- {
- .procname = "reboot",
- .mode = 0555,
- .child = bcmring_sysctl_warm_reboot},
- {}
-};
-
-static struct resource nand_resource[] = {
- [0] = {
- .start = MM_ADDR_IO_NAND,
- .end = MM_ADDR_IO_NAND + 0x1000 - 1,
- .flags = IORESOURCE_MEM,
- },
-};
-
-static struct platform_device nand_device = {
- .name = "bcm-nand",
- .id = -1,
- .resource = nand_resource,
- .num_resources = ARRAY_SIZE(nand_resource),
-};
-
-static struct resource pmu_resource = {
- .start = IRQ_PMUIRQ,
- .end = IRQ_PMUIRQ,
- .flags = IORESOURCE_IRQ,
-};
-
-static struct platform_device pmu_device = {
- .name = "arm-pmu",
- .id = ARM_PMU_DEVICE_CPU,
- .resource = &pmu_resource,
- .num_resources = 1,
-};
-
-
-static struct platform_device *devices[] __initdata = {
- &nand_device,
- &pmu_device,
-};
-
-/****************************************************************************
-*
-* Called from the customize_machine function in arch/arm/kernel/setup.c
-*
-* The customize_machine function is tagged as an arch_initcall
-* (see include/linux/init.h for the order that the various init sections
-* are called in.
-*
-*****************************************************************************/
-static void __init bcmring_init_machine(void)
-{
-
- bcmring_sysctl_header = register_sysctl_table(bcmring_sysctl_reboot);
-
- /* Enable spread spectrum */
- chipcHw_enableSpreadSpectrum();
-
- platform_add_devices(devices, ARRAY_SIZE(devices));
-
- bcmring_amba_init();
-
- dma_init();
-}
-
-/****************************************************************************
-*
-* Called from setup_arch (in arch/arm/kernel/setup.c) to fixup any tags
-* passed in by the boot loader.
-*
-*****************************************************************************/
-
-static void __init bcmring_fixup(struct tag *t, char **cmdline,
- struct meminfo *mi) {
-#ifdef CONFIG_BLK_DEV_INITRD
- printk(KERN_NOTICE "bcmring_fixup\n");
- t->hdr.tag = ATAG_CORE;
- t->hdr.size = tag_size(tag_core);
- t->u.core.flags = 0;
- t->u.core.pagesize = PAGE_SIZE;
- t->u.core.rootdev = 31 << 8 | 0;
- t = tag_next(t);
-
- t->hdr.tag = ATAG_MEM;
- t->hdr.size = tag_size(tag_mem32);
- t->u.mem.start = CFG_GLOBAL_RAM_BASE;
- t->u.mem.size = CFG_GLOBAL_RAM_SIZE;
-
- t = tag_next(t);
-
- t->hdr.tag = ATAG_NONE;
- t->hdr.size = 0;
-#endif
-}
-
-/****************************************************************************
-*
-* Machine Description
-*
-*****************************************************************************/
-
-MACHINE_START(BCMRING, "BCMRING")
- /* Maintainer: Broadcom Corporation */
- .fixup = bcmring_fixup,
- .map_io = bcmring_map_io,
- .init_early = bcmring_init_early,
- .init_irq = bcmring_init_irq,
- .timer = &bcmring_timer,
- .init_machine = bcmring_init_machine,
- .restart = bcmring_restart,
-MACHINE_END
diff --git a/arch/arm/mach-bcmring/clock.c b/arch/arm/mach-bcmring/clock.c
deleted file mode 100644
index ad237a42d265..000000000000
--- a/arch/arm/mach-bcmring/clock.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/*****************************************************************************
-* Copyright 2001 - 2009 Broadcom Corporation. All rights reserved.
-*
-* Unless you and Broadcom execute a separate written software license
-* agreement governing use of this software, this software is licensed to you
-* under the terms of the GNU General Public License version 2, available at
-* http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
-*
-* Notwithstanding the above, under no circumstances may you combine this
-* software in any way with any other Broadcom software provided under a
-* license other than the GPL, without Broadcom's express prior written
-* consent.
-*****************************************************************************/
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/device.h>
-#include <linux/list.h>
-#include <linux/errno.h>
-#include <linux/err.h>
-#include <linux/string.h>
-#include <linux/clk.h>
-#include <linux/spinlock.h>
-#include <linux/clkdev.h>
-#include <mach/csp/hw_cfg.h>
-#include <mach/csp/chipcHw_def.h>
-#include <mach/csp/chipcHw_reg.h>
-#include <mach/csp/chipcHw_inline.h>
-
-#include "clock.h"
-
-#define clk_is_primary(x) ((x)->type & CLK_TYPE_PRIMARY)
-#define clk_is_pll1(x) ((x)->type & CLK_TYPE_PLL1)
-#define clk_is_pll2(x) ((x)->type & CLK_TYPE_PLL2)
-#define clk_is_programmable(x) ((x)->type & CLK_TYPE_PROGRAMMABLE)
-#define clk_is_bypassable(x) ((x)->type & CLK_TYPE_BYPASSABLE)
-
-#define clk_is_using_xtal(x) ((x)->mode & CLK_MODE_XTAL)
-
-static DEFINE_SPINLOCK(clk_lock);
-
-static void __clk_enable(struct clk *clk)
-{
- if (!clk)
- return;
-
- /* enable parent clock first */
- if (clk->parent)
- __clk_enable(clk->parent);
-
- if (clk->use_cnt++ == 0) {
- if (clk_is_pll1(clk)) { /* PLL1 */
- chipcHw_pll1Enable(clk->rate_hz, 0);
- } else if (clk_is_pll2(clk)) { /* PLL2 */
- chipcHw_pll2Enable(clk->rate_hz);
- } else if (clk_is_using_xtal(clk)) { /* source is crystal */
- if (!clk_is_primary(clk))
- chipcHw_bypassClockEnable(clk->csp_id);
- } else { /* source is PLL */
- chipcHw_setClockEnable(clk->csp_id);
- }
- }
-}
-
-int clk_enable(struct clk *clk)
-{
- unsigned long flags;
-
- if (!clk)
- return -EINVAL;
-
- spin_lock_irqsave(&clk_lock, flags);
- __clk_enable(clk);
- spin_unlock_irqrestore(&clk_lock, flags);
-
- return 0;
-}
-EXPORT_SYMBOL(clk_enable);
-
-static void __clk_disable(struct clk *clk)
-{
- if (!clk)
- return;
-
- BUG_ON(clk->use_cnt == 0);
-
- if (--clk->use_cnt == 0) {
- if (clk_is_pll1(clk)) { /* PLL1 */
- chipcHw_pll1Disable();
- } else if (clk_is_pll2(clk)) { /* PLL2 */
- chipcHw_pll2Disable();
- } else if (clk_is_using_xtal(clk)) { /* source is crystal */
- if (!clk_is_primary(clk))
- chipcHw_bypassClockDisable(clk->csp_id);
- } else { /* source is PLL */
- chipcHw_setClockDisable(clk->csp_id);
- }
- }
-
- if (clk->parent)
- __clk_disable(clk->parent);
-}
-
-void clk_disable(struct clk *clk)
-{
- unsigned long flags;
-
- if (!clk)
- return;
-
- spin_lock_irqsave(&clk_lock, flags);
- __clk_disable(clk);
- spin_unlock_irqrestore(&clk_lock, flags);
-}
-EXPORT_SYMBOL(clk_disable);
-
-unsigned long clk_get_rate(struct clk *clk)
-{
- if (!clk)
- return 0;
-
- return clk->rate_hz;
-}
-EXPORT_SYMBOL(clk_get_rate);
-
-long clk_round_rate(struct clk *clk, unsigned long rate)
-{
- unsigned long flags;
- unsigned long actual;
- unsigned long rate_hz;
-
- if (!clk)
- return -EINVAL;
-
- if (!clk_is_programmable(clk))
- return -EINVAL;
-
- if (clk->use_cnt)
- return -EBUSY;
-
- spin_lock_irqsave(&clk_lock, flags);
- actual = clk->parent->rate_hz;
- rate_hz = min(actual, rate);
- spin_unlock_irqrestore(&clk_lock, flags);
-
- return rate_hz;
-}
-EXPORT_SYMBOL(clk_round_rate);
-
-int clk_set_rate(struct clk *clk, unsigned long rate)
-{
- unsigned long flags;
- unsigned long actual;
- unsigned long rate_hz;
-
- if (!clk)
- return -EINVAL;
-
- if (!clk_is_programmable(clk))
- return -EINVAL;
-
- if (clk->use_cnt)
- return -EBUSY;
-
- spin_lock_irqsave(&clk_lock, flags);
- actual = clk->parent->rate_hz;
- rate_hz = min(actual, rate);
- rate_hz = chipcHw_setClockFrequency(clk->csp_id, rate_hz);
- clk->rate_hz = rate_hz;
- spin_unlock_irqrestore(&clk_lock, flags);
-
- return 0;
-}
-EXPORT_SYMBOL(clk_set_rate);
-
-struct clk *clk_get_parent(struct clk *clk)
-{
- if (!clk)
- return NULL;
-
- return clk->parent;
-}
-EXPORT_SYMBOL(clk_get_parent);
-
-int clk_set_parent(struct clk *clk, struct clk *parent)
-{
- unsigned long flags;
- struct clk *old_parent;
-
- if (!clk || !parent)
- return -EINVAL;
-
- if (!clk_is_primary(parent) || !clk_is_bypassable(clk))
- return -EINVAL;
-
- /* if more than one user, parent is not allowed */
- if (clk->use_cnt > 1)
- return -EBUSY;
-
- if (clk->parent == parent)
- return 0;
-
- spin_lock_irqsave(&clk_lock, flags);
- old_parent = clk->parent;
- clk->parent = parent;
- if (clk_is_using_xtal(parent))
- clk->mode |= CLK_MODE_XTAL;
- else
- clk->mode &= (~CLK_MODE_XTAL);
-
- /* if clock is active */
- if (clk->use_cnt != 0) {
- clk->use_cnt--;
- /* enable clock with the new parent */
- __clk_enable(clk);
- /* disable the old parent */
- __clk_disable(old_parent);
- }
- spin_unlock_irqrestore(&clk_lock, flags);
-
- return 0;
-}
-EXPORT_SYMBOL(clk_set_parent);
diff --git a/arch/arm/mach-bcmring/clock.h b/arch/arm/mach-bcmring/clock.h
deleted file mode 100644
index 5e0b98138973..000000000000
--- a/arch/arm/mach-bcmring/clock.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*****************************************************************************
-* Copyright 2001 - 2009 Broadcom Corporation. All rights reserved.
-*
-* Unless you and Broadcom execute a separate written software license
-* agreement governing use of this software, this software is licensed to you
-* under the terms of the GNU General Public License version 2, available at
-* http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
-*
-* Notwithstanding the above, under no circumstances may you combine this
-* software in any way with any other Broadcom software provided under a
-* license other than the GPL, without Broadcom's express prior written
-* consent.
-*****************************************************************************/
-#include <mach/csp/chipcHw_def.h>
-
-#define CLK_TYPE_PRIMARY 1 /* primary clock must NOT have a parent */
-#define CLK_TYPE_PLL1 2 /* PPL1 */
-#define CLK_TYPE_PLL2 4 /* PPL2 */
-#define CLK_TYPE_PROGRAMMABLE 8 /* programmable clock rate */
-#define CLK_TYPE_BYPASSABLE 16 /* parent can be changed */
-
-#define CLK_MODE_XTAL 1 /* clock source is from crystal */
-
-struct clk {
- const char *name; /* clock name */
- unsigned int type; /* clock type */
- unsigned int mode; /* current mode */
- volatile int use_bypass; /* indicate if it's in bypass mode */
- chipcHw_CLOCK_e csp_id; /* clock ID for CSP CHIPC */
- unsigned long rate_hz; /* clock rate in Hz */
- unsigned int use_cnt; /* usage count */
- struct clk *parent; /* parent clock */
-};