Skip to content

Commit

Permalink
[ARM] 3823/1: iop3xx: switch iop32x/iop33x over to shared time code
Browse files Browse the repository at this point in the history
Switch the iop32x and iop33x code over to the common time implementation,
and remove the (nearly identical) iop32x and iop33x time implementations.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Lennert Buytenhek authored and Russell King committed Sep 25, 2006
1 parent 48388b2 commit 863753a
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 265 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-iop32x/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#

obj-y := common.o setup.o irq.o time.o
obj-y := common.o setup.o irq.o
obj-m :=
obj-n :=
obj- :=
Expand Down
15 changes: 11 additions & 4 deletions arch/arm/mach-iop32x/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include <asm/hardware/iop3xx.h>

#define IOP321_UART_XTAL 1843200
Expand Down Expand Up @@ -67,16 +68,22 @@ void __init iop32x_init(void)

#ifdef CONFIG_ARCH_IQ80321
extern void iq80321_map_io(void);
extern struct sys_timer iop321_timer;
extern void iop321_init_time(void);
#endif

#ifdef CONFIG_ARCH_IQ31244
extern void iq31244_map_io(void);
extern struct sys_timer iop321_timer;
extern void iop321_init_time(void);
#endif

static void __init iop3xx_timer_init(void)
{
iop3xx_init_time(IOP321_TICK_RATE);
}

struct sys_timer iop321_timer = {
.init = iop3xx_timer_init,
.offset = iop3xx_gettimeoffset,
};

#if defined(CONFIG_ARCH_IQ80321)
MACHINE_START(IQ80321, "Intel IQ80321")
/* Maintainer: Intel Corporation */
Expand Down
108 changes: 0 additions & 108 deletions arch/arm/mach-iop32x/time.c

This file was deleted.

2 changes: 1 addition & 1 deletion arch/arm/mach-iop33x/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#

obj-y := setup.o irq.o time.o
obj-y := setup.o irq.o
obj-m :=
obj-n :=
obj- :=
Expand Down
12 changes: 11 additions & 1 deletion arch/arm/mach-iop33x/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include <asm/hardware/iop3xx.h>

#define IOP331_UART_XTAL 33334000
Expand Down Expand Up @@ -118,9 +119,18 @@ void __init iop33x_init(void)

#ifdef CONFIG_ARCH_IOP33X
extern void iop331_init_irq(void);
extern struct sys_timer iop331_timer;
#endif

static void __init iop3xx_timer_init(void)
{
iop3xx_init_time(IOP331_TICK_RATE);
}

struct sys_timer iop331_timer = {
.init = iop3xx_timer_init,
.offset = iop3xx_gettimeoffset,
};

#if defined(CONFIG_ARCH_IQ80331)
MACHINE_START(IQ80331, "Intel IQ80331")
/* Maintainer: Intel Corp. */
Expand Down
106 changes: 0 additions & 106 deletions arch/arm/mach-iop33x/time.c

This file was deleted.

21 changes: 0 additions & 21 deletions include/asm-arm/arch-iop32x/iop321.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@
#define IOP321_FINTSRC (volatile u32 *)IOP321_REG_ADDR(0x000007DC)

/* Timers */

#define IOP321_TU_TMR0 (volatile u32 *)IOP321_REG_ADDR(0x000007E0)
#define IOP321_TU_TMR1 (volatile u32 *)IOP321_REG_ADDR(0x000007E4)

#ifdef CONFIG_ARCH_IQ80321
#define IOP321_TICK_RATE 200000000 /* 200 MHz clock */
#elif defined(CONFIG_ARCH_IQ31244)
Expand All @@ -166,23 +162,6 @@
#define IOP321_TICK_RATE 200000000 /* 33.333333 Mhz crystal */
#endif

#define IOP321_TMR_TC 0x01
#define IOP321_TMR_EN 0x02
#define IOP321_TMR_RELOAD 0x04
#define IOP321_TMR_PRIVILEGED 0x09

#define IOP321_TMR_RATIO_1_1 0x00
#define IOP321_TMR_RATIO_4_1 0x10
#define IOP321_TMR_RATIO_8_1 0x20
#define IOP321_TMR_RATIO_16_1 0x30

#define IOP321_TU_TCR0 (volatile u32 *)IOP321_REG_ADDR(0x000007E8)
#define IOP321_TU_TCR1 (volatile u32 *)IOP321_REG_ADDR(0x000007EC)
#define IOP321_TU_TRR0 (volatile u32 *)IOP321_REG_ADDR(0x000007F0)
#define IOP321_TU_TRR1 (volatile u32 *)IOP321_REG_ADDR(0x000007F4)
#define IOP321_TU_TISR (volatile u32 *)IOP321_REG_ADDR(0x000007F8)
#define IOP321_TU_WDTCR (volatile u32 *)IOP321_REG_ADDR(0x000007FC)

/* Application accelerator unit 0x00000800 - 0x000008FF */
#define IOP321_AAU_ACR (volatile u32 *)IOP321_REG_ADDR(0x00000800)
#define IOP321_AAU_ASR (volatile u32 *)IOP321_REG_ADDR(0x00000804)
Expand Down
2 changes: 1 addition & 1 deletion include/asm-arm/arch-iop32x/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
*/
#include <asm/hardware.h>

#define CLOCK_TICK_RATE IOP321_TICK_RATE
#define CLOCK_TICK_RATE (100 * HZ)
21 changes: 0 additions & 21 deletions include/asm-arm/arch-iop33x/iop331.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,27 +137,6 @@


/* Timers */

#define IOP331_TU_TMR0 (volatile u32 *)IOP331_REG_ADDR(0x000007D0)
#define IOP331_TU_TMR1 (volatile u32 *)IOP331_REG_ADDR(0x000007D4)

#define IOP331_TMR_TC 0x01
#define IOP331_TMR_EN 0x02
#define IOP331_TMR_RELOAD 0x04
#define IOP331_TMR_PRIVILEGED 0x09

#define IOP331_TMR_RATIO_1_1 0x00
#define IOP331_TMR_RATIO_4_1 0x10
#define IOP331_TMR_RATIO_8_1 0x20
#define IOP331_TMR_RATIO_16_1 0x30

#define IOP331_TU_TCR0 (volatile u32 *)IOP331_REG_ADDR(0x000007D8)
#define IOP331_TU_TCR1 (volatile u32 *)IOP331_REG_ADDR(0x000007DC)
#define IOP331_TU_TRR0 (volatile u32 *)IOP331_REG_ADDR(0x000007E0)
#define IOP331_TU_TRR1 (volatile u32 *)IOP331_REG_ADDR(0x000007E4)
#define IOP331_TU_TISR (volatile u32 *)IOP331_REG_ADDR(0x000007E8)
#define IOP331_TU_WDTCR (volatile u32 *)IOP331_REG_ADDR(0x000007EC)

#if defined(CONFIG_ARCH_IOP33X)
#define IOP331_TICK_RATE 266000000 /* 266 MHz IB clock */
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/asm-arm/arch-iop33x/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
*/
#include <asm/hardware.h>

#define CLOCK_TICK_RATE IOP331_TICK_RATE
#define CLOCK_TICK_RATE (100 * HZ)

0 comments on commit 863753a

Please sign in to comment.