Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212472
b: refs/heads/master
c: 8a41fa3
h: refs/heads/master
v: v3
  • Loading branch information
Hans J. Koch authored and Thomas Gleixner committed Sep 17, 2010
1 parent c685dd9 commit 46406b1
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3de7b517dfacf1deb0690dbac28f917643e49975
refs/heads/master: 8a41fa3b3c89e5bd3c69219ddeee268bdcce886c
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-tcc8k/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#

# Common support
obj-y += clock.o irq.o time.o
obj-y += clock.o irq.o time.o io.o
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-tcc8k/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ struct clk;
extern void tcc_clocks_init(unsigned long xi_freq, unsigned long xti_freq);
extern void tcc8k_timer_init(struct clk *clock, void __iomem *base, int irq);
extern void tcc8k_init_irq(void);
extern void tcc8k_map_common_io(void);

#endif
62 changes: 62 additions & 0 deletions trunk/arch/arm/mach-tcc8k/io.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* linux/arch/arm/mach-tcc8k/io.c
*
* (C) 2009 Hans J. Koch <hjk@linutronix.de>
*
* derived from TCC83xx io.c
* Copyright (C) Telechips, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#include <linux/init.h>
#include <linux/io.h>
#include <linux/kernel.h>

#include <asm/mach/map.h>

#include <mach/tcc8k-regs.h>

/*
* The machine specific code may provide the extra mapping besides the
* default mapping provided here.
*/
static struct map_desc tcc8k_io_desc[] __initdata = {
{
.virtual = (unsigned long)CS1_BASE_VIRT,
.pfn = __phys_to_pfn(CS1_BASE),
.length = CS1_SIZE,
.type = MT_DEVICE,
}, {
.virtual = (unsigned long)AHB_PERI_BASE_VIRT,
.pfn = __phys_to_pfn(AHB_PERI_BASE),
.length = AHB_PERI_SIZE,
.type = MT_DEVICE,
}, {
.virtual = (unsigned long)APB0_PERI_BASE_VIRT,
.pfn = __phys_to_pfn(APB0_PERI_BASE),
.length = APB0_PERI_SIZE,
.type = MT_DEVICE,
}, {
.virtual = (unsigned long)APB1_PERI_BASE_VIRT,
.pfn = __phys_to_pfn(APB1_PERI_BASE),
.length = APB1_PERI_SIZE,
.type = MT_DEVICE,
}, {
.virtual = (unsigned long)EXT_MEM_CTRL_BASE_VIRT,
.pfn = __phys_to_pfn(EXT_MEM_CTRL_BASE),
.length = EXT_MEM_CTRL_SIZE,
.type = MT_DEVICE,
},
};

/*
* Maps common IO regions for tcc8k.
*
*/
void __init tcc8k_map_common_io(void)
{
iotable_init(tcc8k_io_desc, ARRAY_SIZE(tcc8k_io_desc));
}
23 changes: 23 additions & 0 deletions trunk/arch/arm/plat-tcc/include/mach/io.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* IO definitions for TCC8000 processors and boards
*
* Copyright (C) 1997-1999 Russell King
* Copyright (C) 2008-2009 Telechips
* Copyright (C) 2010 Hans J. Koch <hjk@linutronix.de>
*
* Licensed under the terms of the GNU Public License version 2.
*/

#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H

#define IO_SPACE_LIMIT 0xffffffff

/*
* We don't actually have real ISA nor PCI buses, but there is so many
* drivers out there that might just work if we fake them...
*/
#define __io(a) __typesafe_io(a)
#define __mem_pci(a) (a)

#endif

0 comments on commit 46406b1

Please sign in to comment.