common.c (f43dc23d5ea91fca257be02138a255f02d98e806) common.c (4ee1f6b574765a6c97f945e6b0277e5ccac38cb5)
1/*
2 * arch/arm/mach-orion5x/common.c
3 *
4 * Core functions for Marvell Orion 5x SoCs
5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 *
8 * This file is licensed under the terms of the GNU General Public

--- 12 unchanged lines hidden (view full) ---

21#include <linux/spi/orion_spi.h>
22#include <net/dsa.h>
23#include <asm/page.h>
24#include <asm/setup.h>
25#include <asm/timex.h>
26#include <asm/mach/arch.h>
27#include <asm/mach/map.h>
28#include <asm/mach/time.h>
1/*
2 * arch/arm/mach-orion5x/common.c
3 *
4 * Core functions for Marvell Orion 5x SoCs
5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 *
8 * This file is licensed under the terms of the GNU General Public

--- 12 unchanged lines hidden (view full) ---

21#include <linux/spi/orion_spi.h>
22#include <net/dsa.h>
23#include <asm/page.h>
24#include <asm/setup.h>
25#include <asm/timex.h>
26#include <asm/mach/arch.h>
27#include <asm/mach/map.h>
28#include <asm/mach/time.h>
29#include <mach/bridge-regs.h>
29#include <mach/hardware.h>
30#include <mach/orion5x.h>
31#include <plat/ehci-orion.h>
32#include <plat/mv_xor.h>
33#include <plat/orion_nand.h>
34#include <plat/orion_wdt.h>
35#include <plat/time.h>
36#include "common.h"

--- 557 unchanged lines hidden (view full) ---

594 orion5x_wdt_data.tclk = orion5x_tclk;
595 platform_device_register(&orion5x_wdt_device);
596}
597
598
599/*****************************************************************************
600 * Time handling
601 ****************************************************************************/
30#include <mach/hardware.h>
31#include <mach/orion5x.h>
32#include <plat/ehci-orion.h>
33#include <plat/mv_xor.h>
34#include <plat/orion_nand.h>
35#include <plat/orion_wdt.h>
36#include <plat/time.h>
37#include "common.h"

--- 557 unchanged lines hidden (view full) ---

595 orion5x_wdt_data.tclk = orion5x_tclk;
596 platform_device_register(&orion5x_wdt_device);
597}
598
599
600/*****************************************************************************
601 * Time handling
602 ****************************************************************************/
603void __init orion5x_init_early(void)
604{
605 orion_time_set_base(TIMER_VIRT_BASE);
606}
607
602int orion5x_tclk;
603
604int __init orion5x_find_tclk(void)
605{
606 u32 dev, rev;
607
608 orion5x_pcie_id(&dev, &rev);
609 if (dev == MV88F6183_DEV_ID &&
610 (readl(MPP_RESET_SAMPLE) & 0x00000200) == 0)
611 return 133333333;
612
613 return 166666667;
614}
615
616static void orion5x_timer_init(void)
617{
618 orion5x_tclk = orion5x_find_tclk();
608int orion5x_tclk;
609
610int __init orion5x_find_tclk(void)
611{
612 u32 dev, rev;
613
614 orion5x_pcie_id(&dev, &rev);
615 if (dev == MV88F6183_DEV_ID &&
616 (readl(MPP_RESET_SAMPLE) & 0x00000200) == 0)
617 return 133333333;
618
619 return 166666667;
620}
621
622static void orion5x_timer_init(void)
623{
624 orion5x_tclk = orion5x_find_tclk();
619 orion_time_init(IRQ_ORION5X_BRIDGE, orion5x_tclk);
625
626 orion_time_init(ORION5X_BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
627 IRQ_ORION5X_BRIDGE, orion5x_tclk);
620}
621
622struct sys_timer orion5x_timer = {
623 .init = orion5x_timer_init,
624};
625
626
627/*****************************************************************************

--- 102 unchanged lines hidden ---
628}
629
630struct sys_timer orion5x_timer = {
631 .init = orion5x_timer_init,
632};
633
634
635/*****************************************************************************

--- 102 unchanged lines hidden ---